Reputation: 76
I'm syncing calendar events using the @microsoft/microsoft-graph-client
npm package with the base url /me/calendarview/delta
. It's been working fine until a few days ago. For some reason whenever I create a new calendar event in outlook.office.com and my app syncs, the newly created calendar event has the @removed: {reason: "deleted"}
field set.
However when I lookup that same calendar event using the Microsoft Graph Explorer that same event does NOT have the @removed
field set. Is there any reason a newly created calendar event would look like it's being deleted during a sync?
I'm using @microsoft/microsoft-graph-client v1.3.0
Steps to recreate:
/me/calendar/events
/me/calendarview/delta
with appropriate deltaLink and access token.@odata.type
, id
and @removed
. The id field matches the id of the created event in step 1.If you need more information, let me know. This is affecting some of our users.
Update: I tried a workaround for this issue by calling /me/events/<id>
for each @removed
calendar entry I receive on a delta sync to verify if the event was truly deleted. However when I call that API via the microsoft-graph-client it returns null. If I make the same GET call via MSFT Graph Explorer then the event is returned.
Upvotes: 6
Views: 779
Reputation: 199
I left an answer on another question here: https://stackoverflow.com/a/65348721/6806302
In short, I went off yesterday on a hunch inspired by @mattlaabs's comment on the question above, that the startDateTime..endDateTime range of the events delta was to blame.
And in practice, that is exactly the problem. The answer is two part:
$deltatoken
) ignore the startDateTime..endDateTime
query parameter.Understanding both of the above, it seems that the answer is to:
startDateTime..endDateTime
windows to suite your application's needs$deltatoken
) at some defined interval instead of reusing the same one indefinitelyUpvotes: 3