使用Delta Token同步时,如何获取Outlook日历重复事件的已删除实例?
Got it, I’ve run into this exact frustrating quirk with Outlook recurring events and Delta Sync before—default behavior doesn’t flag single instance deletions because the API treats the entire event series as a single tracked item. The good news is you don’t have to resort to storing every event and doing manual diffs. Here are the actionable fixes:
1. Expand Occurrences in Your Delta Request
The key is to tell the Graph API to track individual event occurrences alongside the parent series. Add the $expand=occurrences parameter to your Delta Sync call. Your request will look something like this:
GET /me/events/delta?$expand=occurrences
When a single instance gets deleted, the Delta response will include that specific occurrence entry with the @removed property set to true, so you can pick up the deletion directly without full event storage.
2. Filter for Deletions (Optional)
If you only care about tracking deletions to cut down on response bloat, pair the expand with a filter for the changeType field:
GET /me/events/delta?$expand=occurrences&$filter=changeType eq 'deleted'
This will narrow the response to only include deleted items (both full series and single instances).
3. Distinguish Between Series and Instance Deletions
Once you get the Delta response, use the @odata.type field to tell the difference:
#microsoft.graph.eventmeans the entire recurring series was deleted#microsoft.graph.eventOccurrencemeans only a single instance was removed
This lets you handle each case appropriately without confusion.
Just a quick note: This works specifically with the Microsoft Graph API (since you’re using Delta Tokens). If you’re using an older Outlook API, the approach might vary, but this is the standard fix for modern Graph-based sync.
内容的提问来源于stack exchange,提问作者XanderJPN50




