Graph API Presence Subscription Failing with "Unsupported workload"

Ryan Gross 21 Reputation points
2020-12-14T16:29:54.92+00:00

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?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,518 questions
{count} votes

Accepted answer
  1. Shiva Keshav Varma 401 Reputation points
    2020-12-17T16:56:43.077+00:00

    The only supported resources are these and that's the reason I believe its throwing an error. Please use /communications/presences/{id} Here {id} is the userid.

    (If the reply was helpful please don't forget to upvote or accept as answer, thank you)

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful