Cory Boyd
Cory Boyd

Reputation: 199

Receive more than just ID for deleted events?

As documented, the event delta API only yields the ID of the deleted resource, and no other attributes.

Our application uses iCalUId as the primary key to synchronize one instance of an event to an external data store. In our system, many users can enable this data sync, meaning events shared across multiple user's calendars will be processed, for which iCalUId uniquely identifies a single instance of a shared event, which is very important for our use case. This is not as simple as just replacing our usage of iCalUId with the internal id.

As such, when notified of an event being deleted, we cannot act on the internal ID alone. Ideally, these notifications would come with other information about the event resource that was deleted, such as iCalUId.

Is it possible to retrieve this information with the current version of the graph API? Or is there a different approach entirely to this sync strategy that makes more sense to pursue?

Upvotes: 3

Views: 456

Answers (2)

Teeces
Teeces

Reputation: 51

We're running into the exact same problem, and unfortunately we're going to be stuck using EWS until Graph offers some way of retrieving the iCalUID for a deleted event.

With EWS we're able to iterate through the events in DeletedItems folder, upon receiving a 'deleted' notification. This was far from ideal, but it was the only way to get the deleted event (since it cannot be retrieved using the ID supplied on the notification). We're now trying to do the same thing with Graph, and we're finding we can't even do that: it appears we can only get "messages" from DeletedItems, not events.

I thought I had found the ideal solution to this, when we realized we could create the subscription with IncludeResourceData = true, and request the iCalUID to be included in all webhook calls. But alas my hopes were dashed, when I eventually realized that none of the extra resource data is included on 'deleted' notification calls (only 'created' and 'updated').

Upvotes: 1

baywet
baywet

Reputation: 5382

The service doesn't support sending more information than just the MS Graph id on deleted events today.

A workaround would be for you to sync the MS Graph id & the iCalUID on previous events (addition, updates...) and then to remove events from your storage by mapping with the MS Graph Id.

You can also request for additional properties to be added to the deleted entries on Microsoft Graph Uservoice.

Upvotes: 1

Related Questions