question

elarrieux avatar image
0 Votes"
elarrieux asked Danstan-MSFT edited

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

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-notifications
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Danstan-MSFT avatar image
0 Votes"
Danstan-MSFT answered Danstan-MSFT edited

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.