Microsoft graph subscription API to create subscription to get file change notification has stopped working today. Getting error below now without any code change: POST https://graph.microsoft.com/v1.0/subscriptions with POST body as
{
"resource": "users/admin@mytestdomain.onmicrosoft.com/drive/root",
"expirationDateTime": "2020-05-08T18:21:50.110168Z",
"lifecycleNotificationUrl": "https://api1.mytestdomain.com/one-drive/one-drive-realtime-processor",
"notificationUrl": "https://api.mytestdomain.com/one-drive/one-drive-realtime-processor",
"clientState": "onedrive-graph-api-subscription-identifier",
}
returns following response:
{
"error": {
"code": "ExtensionError",
"message": "Operation: Create; Exception: [Status Code: BadRequest; Reason: The property 'Resource' does not exist on type 'oneDrive.subscription'. Make sure to only use property names that are defined by the type.]",
"innerError": {
"request-id": "b04d8791-f96f-4a26-a2c2-dd06fa9d1a42",
"date": "2020-05-05T22:13:02"
}
}
}
It seems something has changed in graph api. Link below shows similar error but it was reported 3 years ago: Getting 400 Bad Request Error for MSGraph's create subscription api [Error Code - ExtensionError]
I have tried both v1.0 and beta API versions.