Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Microsoft Graph API telling me events I've just created are being "@removed" when they are still there?

When I am doing a POST to me/calendars/[calendar-id]/events with the following payload. It successfully creates the event, and I receive the new event's id:

{
  "start": {
    "timeZone": "America/Chicago",
    "dateTime": "2022-12-23T15:00:00"
  },
  "end": {
    "timeZone": "America/Chicago",
    "dateTime": "2022-12-23T18:00:00"
  },
  "subject": "Please don't delete me!",
  "body": {
    "contentType": "text",
    "content": "I'm just an event in the future, I wonder if I'll send a '@removed' notice?"
  }
  "isCancelled": false,
  "type": "singleInstance"
}

But shortly after that, my webhook is getting hit with this information for that event, indicating that it was just removed:

{
  "@odata.type": "#microsoft.graph.event"
  "id": [that-event-id]
  "@removed": {
    "reason": "deleted"
  }
}

When I go and look on my Outlook calendar, the event still seems to be present, and if I GET it, isCancelled is false.

This is only happening for events created over a year ago, or two years in the future.

like image 925
Mitch Eagles Avatar asked Oct 30 '25 13:10

Mitch Eagles


1 Answers

Having been plagued by this same issue for about a month ourselves, I think I was finally able to track this down yesterday.

We use the events delta API instead of the webhook API, but apparently the same bug affects both... Someone at Microsoft really needs to fix this, it's insane.

Answer

Changes to events outside of the startDateTime..endDateTime window initially set on the events delta request always show up as a @removed delta.

More details

The events delta API captures the initial startDateTime..endDateTime window, which is then used for all subsequent calls with a $deltatoken. This will also bite you unexpectedly if your delta query uses $select etc. as changes to it will not apply until you create a new delta (by not passing an initial $deltatoken)

This detail is what led us to setting up a bit of a timebomb for ourselves. We had an initial window that was somewhat wide, but suddenly started receiving widespread reports of events showing as cancelled that definitely have not been removed from calendars.

This is a bug

Please, someone from Microsoft acknowledge that this is a real issue. Change made outside the discretely specified time window should NOT affect it, this makes it difficult to build integrations that we trust.

like image 124
Cory Boyd Avatar answered Nov 01 '25 08:11

Cory Boyd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!