Using Exchange push notifications I've been creating a service that syncs over calendar data from Office365 users. I've been using a combination of the Office365 Calendar REST API (to get and manage calendars) and the EWS API (to subscribe to calendar changes).
I noticed that just recently MS has introduced a preview API for their subscription endpoints. However, this API is still in preview mode and I'd like to avoid using it for the time being.
Once I have everything setup, the problem is I can't make a correlation between the calendar event resource (REST) and the EWS CalendarItem resource that is returned on a push notification. The ItemId
for the CalendarItem and the Id
for the REST event differ.
When attempting to update the events that I've saved from the REST API this proves problematic since I cannot find a good method of associating the two.
Any help is greatly appreciated!
Edit
After some further digging, I've actually found that the calendars that are returned from the REST API (GET /calendars
) appear to be Message
items within the EWS hierarchy. So instead of this endpoint returning actual Folder IDs, it returns Item IDs that belong in some folder called "Common Views".
I'm not sure why things are designed this way, but the difference in the base64 encoded IDs seems to be very minimal. I just still can't figure out a good way to associate the two.