Search code examples
exchange-serveroffice365exchangewebservicesews-managed-api

EWS ItemId after migration from in premises Exchange 2013 to Office365


We have an application that connects to Exchange and is able to read, create, reschedule and cancel calendar entries for a bunch of users. All this is done via EWS. To track the events that are created in Exchange for later updates, the app stores the event's id in it's database. In the very near future IT plans to migrate all user mailboxes from in premises Exchange 2013 to Office365. We have updated our app so it can connect to Office365 and perform all it's functions, but there's the following question:

If an event is created in Exchange 2013 and then it is migrated to Office365, will the event's EWS id stay the same? If not, is there a way to match the ids stored in our app to the Office365 events?


Solution

  • If an event is created in Exchange 2013 and then it is migrated to Office365, will the event's EWS id stay the same? If not, is there a way to match the ids stored in our app to the Office365 events?

    If its the EWSId no they will not stay the same and generally there will be no way to convert between the two once you have migrated the appointment. Storing the EWSId is generally not best practice because Appointments can be deleted and recreated as part of the normal process which means the Id will be changed there more information on https://msdn.microsoft.com/en-us/library/office/dn605828(v=exchg.150).aspx.

    Generally the safest thing to do is before you migrate write an application to generated your own custom property on the Calendar Item. Then after the migration write something that update your database with the new Id relating it based on the CustomId you created.

    The GOID property on the Appointment https://msdn.microsoft.com/en-us/library/ee157690(v=exchg.80).aspx won't change after creation so this can be used to find a particular appointment in a Mailbox this will be the same Value for the same appointment in different Mailbox (eg where you have a meeting with multiple attendees).

    The other thing would be check the migration method they are going to use eg a Hybrid Migration which is the most common method you shouldn't have any problems because the items are moved in a native format so there is no fidelity loss.However some third party migration products may not copy a customId if you use that method.