I have been trying to set up a subscription to the new User Presence (preview) API. I am using the Node.js SDK and following the example from: https://github.com/microsoftgraph/nodejs-webhooks-rest-sample.git.
The SDK client is created with:
const client = MicrosoftGraph.Client.init({
authProvider: (done) => {
done(null, this.accessToken);
}
});
client.api(this.subscriptionPath).version('beta')
The request JSON is:
{
"changeType": "updated",
"notificationUrl": "https://<redacted>.ngrok.io/listen",
"resource": "/me/presence",
"clientState": "cLIENTsTATEfORvALIDATION",
"includeResourceData": false,
"expirationDateTime": "2020-12-14T17:27:53.517Z"
}
I receive the Client Validation POST, and respond back with 200 and the decoded validation token (I have verified that I get a different error message if I change this response).
However, the original CreateSubscription request fails with an "Unsupported workload".
The response that is coming back as:
{
statusCode: 400,
code: 'ExtensionError',
requestId: '52441d98-5bd4-42a5-9555-b1670fb1ce9b',
date: 2020-12-14T20:31:28.000Z,
body: '{"code":"ExtensionError","message":"Operation: Create; Exception: [Status Code: BadRequest; Reason: Unsupported workload.]","innerError":{"date":"2020-12-14T15:31:28","request-id":"52441d98-5bd4-42a5-9555-b1670fb1ce9b","client-request-id":"06ed0db9-bdac-d8f9-02f3-e62429a8c02c"}}'
}
I haven't been able to find any details on this "Unsupported workload" Reason. Does anyone know what would cause this error?