Mapping Office365 REST Calendar IDs to EWS CalendarItem IDs
Mapping Office365 REST Calendar IDs to EWS CalendarItem IDs
Mapping Office365 REST Calendar IDs to EWS CalendarItem IDs
Re: Mapping Office365 REST Calendar IDs to EWS CalendarItem IDs
So it turns out that my IDs mismatched due to subscribing to EWS push notifications via the `Exchange2007` version. `Exchange2007_SP1` and beyond have compatible EwsIds with each other so this includes Office365.
Replacing `-` characters with `/` and `_` characters with `+` allows me to properly make calls to Office365 API resources.
Finally, when making a call to [get calendars](https://msdn.microsoft.com/office/office365/APi/calendar-rest-operations#GetcalendarsGetacalendarcollectionREST), the API is actually returning `Message` item types that live under the `Common Views` folder. So when attempting to use these IDs for subscriptions, the EWS API will complain that I've sent it ItemIDs and not a Folder ID.
**Thankfully** I've found that making a request to the REST API via `GET /calendars/ews_folder_id` actually works once you properly translate the ID to a URI safe type (see above conversion).
Replacing `-` characters with `/` and `_` characters with `+` allows me to properly make calls to Office365 API resources.
Finally, when making a call to [get calendars](https://msdn.microsoft.com/office/office365/APi/calendar-rest-operations#GetcalendarsGetacalendarcollectionREST), the API is actually returning `Message` item types that live under the `Common Views` folder. So when attempting to use these IDs for subscriptions, the EWS API will complain that I've sent it ItemIDs and not a Folder ID.
**Thankfully** I've found that making a request to the REST API via `GET /calendars/ews_folder_id` actually works once you properly translate the ID to a URI safe type (see above conversion).