1

The exact POST I made to create exactly 1 subscription on 1 resource:

POST https://graph.microsoft.com/v1.0/subscriptions
Content-Type: application/json

{
  "changeType": "created",
  "notificationUrl": "https://myurl.com/endpoint",
  "resource": "/me/mailfolders('inbox')/messages",
  "expirationDateTime": "{{addMinutes(now; 4225)}}",
  "clientState": "{{uuid}}"
}

Microsoft Graph notifications for changes in resource data Doc

What's weird is that sometimes it sends the same data to my URL 2 times, sometimes just 1, sometimes 3. I know they're duplicated because they're completely the same (I used a difftool).

I've read this, that, and this but I just couldn't understand why its possible to send out more than 1 webhook for a "created" notification. I'm responding with a 202 as soon as I get the POST and these duplicated POSTS are not even 1 second apart so not sure if I could store the "@odata.etag" and check if its already in a database as I use integromat to receive these change notifications.

So what gives? How can I make it so that I only receive 1 notification? Does it have something to do with how the mailbox is setup? Is storing the @odata.etag really the proper way to handle this? Really absurd if that's the case.

xyzit
  • 89
  • 1
  • 8

1 Answers1

0

This might be due to the known issues in Change notifications:

enter image description here

For information:https://learn.microsoft.com/en-us/graph/known-issues#change-notifications

Mehtab Siddique
  • 556
  • 1
  • 2
  • 5