Reputation: 203
I have created a webhook subscription for Users and Groups by making a POST call to https://graph.microsoft.com/v1.0/subscriptions
with the following as payload:
{
"changeType": "updated,deleted",
"notificationUrl": "https://a0317384.ngrok.io",
"resource": "groups",
"expirationDateTime": "2019-06-25T19:23:45.9356913Z",
"clientState": "<redacted>"
}
A Subscription is successfully getting created and I am returning verification token from my endpoint. I can also see it in the list of Subscriptions by making GET call on above URL.
When I am making some changes in Groups, like changing displayName
or adding Members to the Group, I am not seeing notifications in real-time. Sometimes I am getting notifications in a bulk and other times the notifications do not arrive at all.
I have tried multiple times to delete and re-create the Subscription, but I still see the same behavior.
Can anyone tell why is it happening?
Upvotes: 1
Views: 488
Reputation: 5372
Notifications can be batched for performance optimizations and the delay to deliver notifications can vary based on service load and other factors.
While debugging you should also make sure there's no blocking conditions set by the IDE (like a break point for instance) that might block other incoming requests.
Lastly, it's pretty rare, but service outages can happen, in that case the best thing to do it to contact support.
Upvotes: 1