3

I'm using Microsoft Graph API change subscription to handle created/updated/deleted calendar events.

I noticed that the API always sends at least one UPDATED notification for each newly CREATED event. A quick search shows that it's normal behavior.

My question is: can this be considered a guaranteed behavior of the API?

If so, my plan is to only subscribe to UPDATED and DELETED notifications and treat each UPDATED event as a potential CREATED event depending on if a local copy already exists. This approach helps me deal with concurrency issues. I just want to make sure I won't miss any CREATED events this way.

thankyoussd
  • 1,875
  • 1
  • 18
  • 39
  • Yes i think you're good above. For more information refer the docs related to all the [resources](https://learn.microsoft.com/en-us/graph/api/resources/webhooks?view=graph-rest-1.0), [how it works](https://learn.microsoft.com/en-us/graph/delta-query-overview), [calendarview](https://learn.microsoft.com/en-us/graph/delta-query-events?tabs=http) etc . – Dev Mar 20 '21 at 04:25

1 Answers1

0

Yes, it is a guaranteed behavior, it is a known issue when you use the change notification of the user calendar event(/users/{id}/events).

See Additional notifications for users:

Subscriptions to changes for user with changeType set to updated will also receive notifications of changeType: updated on user creation and user soft deletion.

Joy Wang
  • 39,905
  • 3
  • 30
  • 54