I am subscribing to the one drive subscriptions for updates on the root folder of my Onedrive. I have successfully registered the subscriptions using the following request
curl --location --request POST 'https://graph.microsoft.com/v1.0/subscriptions'
--header 'Authorization: Bearer EwBoA8l6BAAUbDba3x2OMJElkF7gJ4z/VbCPEz0AARM9xwGQX....'
--header 'Content-Type: application/json'
--data-raw '{
"changeType": "updated",
"notificationUrl": "https://707d-103-85-127-2.ngrok-free.app/onedrive/webhook",
"resource": "/me/drives/62167e90bce30a54/root",
"expirationDateTime": "2024-07-30T11:23:00.000Z",
"clientState": "alakazam"
}'
If I rename a file, I am getting a webhook call on my locally running api. But, if I update the user access, like sharing the file with a new user or removing access for a user of any file, I am not getting any webhook call. As suggested by the above api call, I am using ngrok to locally receive the webhook notification.
I am referring to the following documentation for Onedrive api:-
OneDrive Api Documentation
I have also tried to find if the changeType parameter in the subscription api payload needs some other value for notifying about user access updates, but couldn’t find any.