Graph Api create subscription returns BadRequest ExtensionError when includeResourceData set to false

Emmanuel Larrieux 26 Reputation points
2021-07-14T03:59:49.717+00:00

Graph Api create subscription returns BadRequest ExtensionError when includeResourceData set to false.

POST https://graph.microsoft.com/v1.0/subscriptions
{
"changeType": "updated,deleted",
"notificationUrl": "https://notificationsapp.azurewebsites.net/api/notify",
"resource": "/groups",
"expirationDateTime": "2021-07-14T04:00:00.0000000Z",
"clientState": "ClientStateSecret",
"includeResourceData": false
}

Response:

{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: BadRequest; Reason: BadRequest]",
"innerError": {
"date": "2021-07-14T03:47:43",
"request-id": "60825edd-387a-438e-8c2a-5a7ba042870b",
"client-request-id": "60825edd-387a-438e-8c2a-5a7ba042870b"
}
}
}

If I remove the "includeResourceData": false, then the subscription is successfully created.

Best,
Emmanuel

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

Accepted answer
  1. Danstan Onyango 3,741 Reputation points Microsoft Employee
    2021-07-15T08:00:32.713+00:00

    I see the same behavior with groups resource type. Since this resource does not support including the resource data with the change notification - Only these are supported as of now, I suggest you ignore the includeResourceData field in your request until the behavior when it is set to false is addressed.

    It is important to note that this issue only happens for groups resource and not the others that support change notifications.

    0 comments No comments

0 additional answers

Sort by: Most helpful