Migration from hosted Exchange server to Office 365
I. Pre-migration activities
Below you will find the list of key points to be considered:
Step 1: (Optional) Add a custom domain to target Office 365
If you want to migrate to your own (custom) domain, you need to make sure that it's registered and verified in your target Office 365. If necessary, add your custom domain to the target Office 365 tenant and verify it.
Skip this step if you already have your own domain registered in the target Office 365 or you would like to migrate to the initial domain (e.g. yourcompany.onmicrosoft.com) that was assigned to you by Microsoft when you created your target Office 365 tenant – you can always add a custom domain after the migration.
Step 2: Make sure that the account used to connect to the source server can impersonate other users
Check if your admin account on the hosted Exchange server is assigned the ApplicationImpersonation role for the mailboxes you intend to migrate. See this article to learn how to assign the impersonation rights manually.
If you cannot assign the necessary permissions by yourself, ask your hosted Exchange provider for assistance.
Step 3: Create target mailboxes and assign licenses in Office 365
Check out this article to learn how to create Office 365 mailboxes and assign licenses in bulk.
If you have already created new mailboxes in your target Office 365 tenant, it is possible to hide them from the GAL (e.g. to prevent your users from sending emails to them until the migration is finished). The mailboxes will be still visible in CodeTwo Office 365 Migration and the migration will proceed as usual.
Step 4: Prepare a CSV file containing a list of already matched source and target mailboxes
The CSV file needs to contain the following data:
- Source mailbox email address
- Source mailbox ID (the ExchangeGuid property value)
- Target mailbox email address
- Target mailbox ID (the ExternalDirectoryObjectId property value)
Optionally, you can also include the following data:
- Source mailbox first name
- Source mailbox last name
- Source mailbox display name
If necessary, contact your hosted Exchange server provider to supply you with the necessary data.
Step 5: Install and activate CodeTwo Office 365 Migration
Install the program on any machine within your organization. The machine needs to be able to access both your hosted Exchange server as well as the target Office 365 tenant.
The following additional components will also be installed, as they are required for CodeTwo Office 365 Migration to run properly:
- .NET Framework 4.6.1 or higher (required on all systems),
- Windows PowerShell 3.0 (required on all systems).
The installation wizard will guide you through the whole installation process. After the installation is finished, remember to activate the program.
II. Migration process
Step 1: Connect to the source server
Make sure that the software user who runs the migration is a local administrator.
Once you start the program, you will see the Dashboard tab. Click Create a new migration job link on the How to start card. Select the source server type: Exchange Server. The Create Exchange migration job wizard will open. Set the name of the job and select The program is installed outside the source Exchange server domain (the Migrate mailboxes using a CSV file containing a list of already matched source and target mailboxes checkbox will be selected automatically). Next, proceed to the Mailboxes step. If this is your first migration job, you will need to configure a connection to a hosted Exchange server. Click Add new source connection in the Source server drop-down meu and a wizard will open. You need to go through these steps:
- Server connection – in this step, provide your server’s FQDN or IP address. Options that are unavailable for this connection method, e.g. the Autodiscover feature, are greyed-out.
- Admin account – here, you need to enter the primary SMTP address and password of the admin account that will be used to access mailboxes on the source server. Remember that the admin account must be assigned the ApplicationImpersonation role to the mailboxes you want to migrate (as specified in Pre-migration activities - Step 2 above).
- Configuration – this process configures your connection based on the settings provided in the previous steps. With the Check the impersonation settings button, you can check beforehand if the admin account is actually assigned the ApplicationImpersonation role for a given source user mailbox.
Click Finish to close the server connection wizard.
Step 2: Connect to the target server
After successfully configuring the source connection, you will get back to the Mailboxes step of the migration job wizard. Now, set up a new target server connection by choosing Add new target connection from the Target server drop-down menu. A simple wizard will open:
- Office 365 cloud (legacy setting) – choose Office 365 global, as you can no longer migrate your data to the Office 365 Germany cloud (Microsoft retired Microsoft Cloud Deutschland on October 29, 2021).
- Application registration – decide how you want CodeTwo Office 365 Migration to be registered the Azure AD of your target Office 365 tenant: automatically by the program (global admin account credentials will be required) or manually by yourself. If you select the second option, you will be asked to provide the application registration details in the next step.
- Application details – enter the necessary application information. Additionally, you need to enter an email address of any user from your target Office 365 tenant. If you are migrating public folders as well, we recommend using an email address of an admin account, as this account needs to have (or be assigned) the Owner rights to the root public folder and any subfolders, to which you will be migrating your source data.
- Configuration – this process registers CodeTwo Office 365 Migration in your Azure AD (if you have selected the Automatic registration option in the Application registration step) and configures the connection to the target Office 365 tenant.
After your connection is established, click Finish to go back to the Mailboxes step.
Step 3: Import a CSV file with a list of mailboxes between which the migration will take place
Click Import from CSV and select the CSV file containing a list of already matched source and target mailboxes. The Import matched mailboxes window opens. You now need to map the columns from your CSV file with headings (parameters) used by the program. If the data shown in Step 2 – Review your data is not displayed correctly, adjust the CSV file formatting options, such as fields delimiter or file encoding. Learn more
Click Import when done and continue with the migration job wizard configuration.
Step 4: Customize all necessary aspects of the migration job
You can configure the following additional options:
- Scheduler - allows you to set the job to be automatically started in the desired time periods, so you do not have to control it manually.
- Time filter - is used to exclude items that are older or newer than a particular date.
- Folder filter - may completely exclude specific folders from the migration process.
- Advanced settings - this step lets you define how many mailboxes should be migrated at the same time and set the maximum size of items to be migrated.
Step 5: Start the migration
Move on to the JOBS tab and click Start on the toolbar to begin the migration. Once you start the migration, all items from the source mailboxes will be migrated to their corresponding target mailboxes.
To speed up the migration, you should temporarily increase the EWS throttling policy limits in Exchange Online. Find out how to do so in this article.
The migration processing time depends on several different factors, e.g. the number of mailboxes and items, the speed of internet connection, etc. We have published more details here.
Step 6: Check if the number of migrated items in the target mailbox folder corresponds to its equivalent on the source server
If you notice any missing items in the target mailboxes, restart the migration by using the Run delta migration option.
Please be aware that the program does not migrate some specific folders at all. Those are i.e. Sync Issues or ones created while putting a mailbox on litigation hold.
If any problems appear during the migration process, they will be indicated by the yellow or red triangle visible in the Migration Status column in the main window of the program. Details of the problems may be checked in the diagnostic files.
Step 7: Check if there are any new items in the source mailbox after migration
Once the migration is finished and you have noticed that some new items appeared in the migrated source mailbox, just restart the migration by using the Run delta migration option. Please keep in mind that this feature migrates only new items, not the modified ones. Delta migration can also be used to resolve issues with any items that failed to migrate on the first attempt.
III. Post-migration cleanup
Step 1: Change DNS records (MX, Autodiscover)
You need to change your MX records to enable mail flow to the new server. Additionally, you should also set up Autodiscover record to facilitate connecting migrated mailboxes with a mail client (e.g. Outlook). To change these DNS records manually, follow the steps below:
- Log in to your Microsoft 365 admin center (Office 365 admin center).
- Go to Settings > Domains, select your domain and click DNS Management.
- Choose I’ll manage my own DNS records and click Next.
- Select Exchange checkbox and click Next.
- On this page, find the details regarding MX records and CNAME records (Autodiscover) that you need to use at your domain registrar. For specific instructions on how to configure DNS records in your domain registrar, visit this Microsoft page.
- Once the DNS records have been configured, click Verify back in Office 365. Please note that it may take several hours for the changes to propagate.
If any new items appear in a source mailbox while the MX records are being changed, it is possible to migrate these items after the records migration process is completed. It can be done via the Administration Panel of the program by choosing the Run delta migration option.