1

I am trying to receive change notifications from Microsoft Graph whenever an event is updated (created, deleted, or edited).

I have successfully managed to create subscriptions. The URL that receives the notifications is of an Azure Function. However, whenever I create or delete an event, the Graph sends multiple notifications for one specific change.

As mentioned in the documentation https://learn.microsoft.com/en-us/graph/webhooks, I am sending back 202-Accepted status code to the Graph as soon as I receive the change notification.

return new StatusCodeResult(202);

This is supposed to stop any further notifications from Graph. However, I still receive 2 to 4 notifications for a specific change.

I couldn't figure out what else I can do to limit the number of notifications to just one per change. Any help/suggestion would be highly appreciated.

Thanks

GMDev
  • 97
  • 1
  • 13

1 Answers1

2

There's is absolutely no guarantee that an event in the graph will result in a single notification.
This is due to backend service architecture, data replication, data structures and more.
What you should do is keep tracks of the change key as outlined in this answer.

baywet
  • 4,377
  • 4
  • 20
  • 49
  • My problem is I'm using django rest and my api is turning into a async api. What I mean is I'm receaving multiple notifs in my api and one or two of them is overlapping. For instance 3rd subscription notification is being sent to me even before the 2nd notification receiving has been completed – Shahriar Rahman Zahin Dec 11 '22 at 11:41