Migration between two Office 365 tenants

I. Pre-migration activities

Before you install and configure CodeTwo Office 365 Migration, make sure that your environment (both the source and target server) is prepared for migration and that you meet the system requirements.

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.

Learn more about adding custom domains to Office 365

Step 2: (Applies to migrations to Office 365 Germany) Recreate source Office 365 users in target Office 365

When migrating to Office 365 Germany (German cloud), you need to manually create user accounts on your target Office 365 tenant for each mailbox you intend to migrate. You also need to assign Office 365 licenses to these user accounts.

Learn more about creating new Office 365 users

Learn more about importing multiple users to Office 365 via CSV files

Step 3: Make sure that the admin account used to connect to the source Office 365 tenant has the necessary roles assigned and that it has its mailbox configured correctly

  1. Check if the source admin account has the following management roles assigned:
    • ApplicationImpersonation
    • View-Only Configuration
    • View-Only Recipients

    If any required roles are missing, you can either assign them manually, following the steps described in this KB article or let the program assign them for you in the Configuration step of the Source server connection wizard.

  2. Ensure that this account is mailbox-enabled.

Step 4: Verify that the admin account used to connect to the target Office 365 tenant has the necessary roles assigned

  1. Check if the target admin account has the following management roles assigned:
    • ApplicationImpersonation
    • View-Only Configuration
    • View-Only Recipients
    • Public Folders*
    • User management administrator/Global administrator*

      Important

      Please note that the Public Folders role is only required if you plan to migrate public folders. Moreover, the User management administrator/Global administrator role is required to create new users and mailboxes. Therefore, it's not required to assign it to the admin account if you are migrating data to the mailboxes that already exist on the target server.

    If these roles are missing, you can either assign them manually, following the steps described in this KB article or let the program assign them for you during the Configuration step of the Target server connection wizard.

  2. Ensure that this account has a valid, non-hidden mailbox on the target Office 365 tenant.

Step 5: (Recommended) Set your Office 365 admin account's primary email address to use the initial *.onmicrosoft.com domain

You should set the *.onmicrosoft.com (or *.onmicrosoft.de in case of Office 365 Germany) domain to be used as the primary email address of the admin account that will be used to connect to your source and target Office 365 tenant. We recommend doing so even if you have already added a custom domain to your target Office 365 tenant (see Step 1 above). Otherwise, you will encounter problems if you change the tenants' domain names during the migration.

To change your primary email address in Office 365, perform the following actions:

  • Log in to your Office 365 tenant.
  • Go to Microsoft 365 admin center (Office 365 admin center).
  • Choose Users > Active users from the menu on the left.
  • Select the admin account that will be used in CodeTwo software to connect to that tenant.
  • In the window that opens, click Edit in the in the User name / Email row.
  • Click Set as primary next to the alias in the *onmicrosoft.com / *onmicrosoft.de domain.
  • Click Save to apply the changes.

Step 6: Assign licenses in Office 365

Make sure that Office 365 licenses are assigned to all user accounts that will be used as the target mailboxes. You can set the program to create the mailboxes and assign the Office 365 licenses automatically. Learn more

Alternatively, you can assign licenses manually in Office 365. Check out this Microsoft's article that explains how to do so. 

Step 7: Install and activate CodeTwo Office 365 Migration

The program needs to be installed on any machine with connection to both the source and the target Office 365 environment.

The following additional components will also be installed, as they are required for CodeTwo Office 365 Migration to run properly:

The installation wizard will guide you through the whole installation process. After the installation is finished, remember to activate the program

II. Migration process

The steps below will guide you through the correct configuration of CodeTwo Office 365 Migration:
 

Step 1: Connect to the source server

Important

Make sure that the software user who runs the migration is a local administrator.

When 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: Office 365. The Create Office 365 migration job wizard will open. Set the name of the job and click Next to proceed to the Source mailboxes step. If this is your first migration job, you will need to configure a connection to the Office 365 tenant that will be used as the source of your migration. Click Add new source connection in the Source server drop-down menu and a wizard will open. You need to complete three steps:

  • Office 365 cloud  choose between connecting to Office 365 global and Office 365 Germany.
  • Admin credentials – provide the email address and password for the Office 365 admin account. If this account has multi-factor authentication enabled, enter the app password instead (learn more).
  • Configuration – the program configures your Office 365 connection and checks whether the account provided in the previous step has the necessary roles assigned. If not, the program will attempt to assign them automatically. In such a case, you might be asked to provide the credentials of another account that is assigned the Global administrator role. This account will not be used to connect to the Office 365 tenant, but only to assign the missing roles.

If the configuration is successful, click Finish.

If any errors appear, see Troubleshooting

Step 2: Select mailboxes you want to migrate and define target connection

After successfully configuring the source connection, you will get back to the migration job wizard.

The Source mailboxes step now allows you to include or exclude mailboxes by using multiple filters. By default, the program includes All users along with the Public Folders as it is a most common scenario. Choose the mailboxes you want to migrate and proceed to the next step (Target mailboxes).

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 – choose between connecting to Office 365 global and Office 365 Germany.
  • Admin account – provide the email address and password of the Office 365 admin account. If this account has multi-factor authentication enabled, enter the app password instead (learn more). Click Next to move on to the Configuration step.
  • Configuration – this process configures the connection to the target Office 365 server and checks whether the account provided in the previous step has the necessary roles assigned. If not, the program will attempt to assign them automatically. In such a case, you might be asked to provide the credentials of another account that is assigned the Global administrator role. This account will not be used to connect to the Office 365 tenant, but only to assign the missing roles.

Once the configuration ends successfully, you will see green check marks. If any errors appear, see Troubleshooting.

After your connection is established, click Finish and proceed to the next step (Match mailboxes).

Step 3: Match source and target mailboxes

Matching the source mailboxes with the target mailboxes can be done automatically, by using the built-in automatch feature, or manually. We suggest that you start off by matching mailboxes automatically and modify the automatch settings if not all the mailboxes were matched in the first run. Use the manual option only if there are any mailboxes left unmatched after several automatch runs with a different configuration of the automatch mechanism.

To match mailboxes automatically, select those mailboxes that you want to match and click the Match mailboxes button. In the window that opens, click the Automatch button. Configure the automatching mechanism and click Automatch to start the matching process. If not all the mailboxes were matched, modify the automatch mechanism and run it again. Repeat this as many times as necessary.

Read more about the default configuration of the automatch mechanism and how to customize it

If any source mailbox is left unmatched despite several attempts to match it automatically with different automatch settings, match it manually.

Note that you can set the program to create target users and mailboxes in your Office 365 tenant, whether you’re matching mailboxes manually or automatically. Learn more

When you have matched all your mailboxes, save your configuration and close the matching window. Continue with the migration job wizard. The next steps will allow you to configure additional options.

Step 4: Customize all necessary aspects of the migration job

You can configure the following additional options:

  • Scheduler - this step 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 - this filter is used to exclude items that are older or newer than a particular date.
  • Folder filter - in this step you can 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

Review your migration job in the Job summary step. Click Finish to close the wizard.

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.

Info

The migration processing time depends on several different factors, e.g. the number of mailboxes and items, the speed of internet connection, EWS throttling settings. See this article for details. 

Step 6: Check if the number of items migrated in the target mailboxes matches the number of items in the source server mailboxes

If you notice any missing items in the target mailbox, restart the migration by using the Rescan feature.

Important

Please be aware that the program does not migrate some specific folders at all. Those are e.g. Sync Issues or the ones created while putting a mailbox on litigation hold.

Info

If any problems appear during the migration process, they will be visible on the JOBS tab in the Migration status column or on the Job bad news card. Details of the problems can 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 meantime) in the migrated source mailbox, just restart the migration by using the Rescan feature.

Important

Please keep in mind that the Rescan feature uploads only new items, not the changed ones.

III. Post-migration cleanup

Once the migration is completed, please follow the points below:

Step 1: Disconnect the domain from the source tenant

If you plan to move your custom domain from the old Office 365 tenant to the new one, you first need to remove it from the former. To do so:

  1. Log in to your Microsoft 365 admin center (Office 365 admin center).
  2. Go to Setup > Domains.
  3. Select the domain you want to disconnect.
  4. In the window that opens, click Remove. If you are notified of any dependencies regarding the domain you intend to remove, simply confirm that you want to disconnect the domain.

Step 2: 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:

  1. Log in to your Microsoft 365 admin center (Office 365 admin center).
  2. Go to Setup > Domains, select your domain and click DNS Management.
  3. Choose I’ll manage my own DNS records and click Next.
  4. Select Exchange checkbox and click Next.
  5. 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.
  6. 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.

Warning

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 Rescan feature.

Step 3: Outlook profiles

If your Outlook has problems connecting to the new Office 365 tenant, you need to create a new Outlook profile for each user in your domain. Refer to this Knowledge Base article that explains how to do so.

IV. Troubleshooting

For troubleshooting information, refer to our Knowledge Base.

For additional resources, refer to Frequently Asked Questions or contact us.

Was this information useful?