Office 365 Tenant to Tenant Migration is commonly necessary when company goes through merger and acquisition, tenant name change, splitting situations, etc. This process is also called as cross-tenant migration as it is the O365 migration. With the help of this article you will know the complete process of Office 365 tenant to tenant migration. Let’s start this article.
Table of Content
- What is Office 365 Tenant to Tenant Migration Procedure?
- Why Microsoft Tenant to Tenant migration is important?
- How to Migrate Office 365 tenant to one another tenant?
- Some requirements for Existing and Target Tenant
- Generate a Mail enabled security group in existing tenant
- Find and copy the Tenant ID of the source and target tenant
- Generate the Migration Application and the Secret Value
- Register an application
- Give API Permission
- Add New Client Secret
- Allow Admin Consent for MSFT
- Configure the Exchange Online Organization Relationship and Migration Endpoints in Target Tenant
- Accepting the migration request and setting up the organizational relationship in the source tenant
- Generate Mail Users in the Target Tenant
- How to locate the source mailbox’s ExchangeGuid and ExchangeLegacyDN
- In Target Tenant, add ExchangeGuid and ExchangeLegacyDN
- Check the availability of the migration server
- Give the target tenant’s mail users a license
- Creating a Migration Batch in the Target Tenant
- Conclusion
What is Office 365 Tenant to Tenant Migration Procedure?
The procedure of moving mailboxes from one Microsoft 365 tenant to another is known as tenant to tenant migration. This migration can involve one or multiple mailboxes with complete visible mailbox data like emails, contacts, calendars, notes, etc.
Why Tenant to Tenant migration is important?
There are some reasons why the Microsoft 365 Tenant migration is important. Some of the reasons are mentioned below:
Acquired or Merged: When one company merges or acquired by another, it is usually requires a tenant to tenant migration. In some cases, they may choose to migrate mailboxes from both organizations into a new tenant rather than moving from one tenant into another.
Splitting: When a company is in the state to split or some portion of the company is to split away, they need to migrate selected objects and content from existing tenant to new tenant.
Redeveloped: While doing rebranding of the business it is important to make new tenant that can tie up with the new brand. This process can involve Office 365 tenant to tenant migration.
How to Migrate Office 365 tenant to one another tenant?
The procedure of Microsoft 365 tenant migration is little lengthy and does requires the knowledge of the PowerShell. For doing this process we require Window PowerShell, Microsoft 365 admin center, and Azure AD Web Portal.
Each and every step plays an important role in this process. Read all the notes and steps carefully. If you will face any error while doing the Office 365 tenant to tenant migration you might need to start from the beginning. That’s why reading carefully all the steps can help you to easily migrate Office 365 tenant mailboxes.
Some requirements for Existing and Target Tenant
We must first complete some tasks in both the source and target tenant. I’ll tell you how to do that, please follow the steps mentioned below:
Generate a Mail enabled security group in existing tenant
Some of the steps are mentioned below to generate the mail enabled security.
- Open com by using Admin login details.
- Go to the Office 365 Admin Center.
- Select Teams & Groups and select Active teams & groups.
- Go to Security Groups and click on Add a mail-enabled security group.
- Fill out the Name and Description for basic set up and click on Next button.
- Click on Assign Owner by selecting any user of your choice, plus you can add multiple users. After choosing the user clicks on Add and then press the Next.
- In next window Add members, add any user as a member and click on Add button then press the Next.
- In the next Edit Setting, add group email address in which you can use the same name what you used while creating group. Then Go to next step as communication and select the option allow people outside, then press the Next
- In review and finish group window, just recheck all you details then click on Create group. Now copy the group name and the email address and save it for later.
Find and copy the Tenant ID of the source and target tenant
You have to copy and store the Tenant ID of both existing tenant and target tenant.
- Open Microsoft Azure by visiting portal.azure.com in both the tenants.
- Now copy the Tenant ID and save it.
In the Target Tenant, Generate the Migration Application and the Secret Value
Register an application
- Open a link https://portal.azure.com/#home and fill your new tenant admin login credential to go into the Azure AD Portal.
- Press the View button below the Manage Azure Active Directory.
- Go to App Registrations.
- Press the New registration to register your new application.
- A new window is opened as Register an application. Now fill the name of the application > Click on second option as Account in any organizational directory > Select the Web from the options and fill https://office.com. And press the register
Once the application creation is completed, it will direct you to the application page. Store the Application name and the Client ID for further process.
Give API Permission
- Go to the API Permission.
- In next window the permission of User Read is assigned, you can delete it by clicking on the three dots because this permission is not required.
- Select add a permission to give the permission of mailboxes migration.
- New window is opened as Request API Permission, select APIs my organization uses and searches Office 365 then choose Office 365 Exchange Online from the options.
- Press the button of Application permission.
- Now search mailboxes in the search bar > Choose Mailbox > select the mailbox migration and press the add permission
The mailbox migration permission is assigned.
Add New Client Secret
- Go to the Certificates and Secrets.
- Press the New Client Secret and create the new secret value > Add description on the right side window then press the Add.
- Copy the secret value that was created.
Allow Admin Consent for MSFT
- Open Azure Active Directory and go to Enterprise applications.
- Select the application that we created.
- Go to Permissions and select the Grant Admin Consent for MSFT.
- Permission request window will open, press the Accept button for confirmation.
- Now reload the page and then you will be able to see the permission granted through admin consent.
Configure the Exchange Online Organization Relationship and Migration Endpoints in Target Tenant
- Go to Home screen and search Windows PowerShell and choose Run as Administrator.
- In Windows PowerShell, the execution policy is by default set to limited. Users should perform the following command to change the execution policy to Unrestricted so that they can run any PowerShell scripts.
- Set-ExecutionPolicy Unrestricte.
- Enter after typing Y when requesting permission.
- Now connect to Exchange Online PowerShell by using the new tenant login credential.
- Use the PowerShell script mentioned below to generate a new migration endpoint for Office 365 tenant to tenant migration.
- Use PowerShell script mentioned below to create or edit organization relationship object.
[sourcecode]$sourceTenantId=”[tenant id of your trusted partner, where the source mailboxes are]”
$orgrels=Get-OrganizationRelationship
$existingOrgRel = $orgrels | ?{$_.DomainNames -like $sourceTenantId}
If ($null -ne $existingOrgRel)
{
Set-OrganizationRelationship $existingOrgRel.Name -Enabled:$true -MailboxMoveEnabled:$true -MailboxMoveCapability Inbound
}
If ($null -eq $existingOrgRel)
{
New-OrganizationRelationship “[name of the new organization relationship]” -Enabled:$true -MailboxMoveEnabled:$true -MailboxMoveCapability Inbound -DomainNames $sourceTenantId
}[/sourcecode]
Note: Replace [tenant id of your trusted partner, where the source mailboxes are] with the Source Tenant ID that we copied before. Instead of [name of the new organization relationship], type Name for the Organization Relationship. Also, save the name of this relationship; for further process.
Accepting the migration request and setting up the organizational relationship in the source tenant
- Open Existing Tenant Account and login with your Admin ID credentials.
- Copy and paste the URL mentioned below.
Note: Replace your source tenant with (sourcetenant.onmicrosoft.com) and application ID with [application_id_of_the_app_you_just_created].
- Open the URL in the same browser where the existing tenant is opened.
- The Pop message appears on the screen, just Accept the application.
- Now connect to Exchange Online PowerShell by using the source tenant login credential.
- Use the PowerShell script mentioned below to generate a new organization relationship or edit your source organization relationship object to your new tenant.
[sourcecode]$targetTenantId=”[tenant id of your trusted partner, where the mailboxes are being moved to]”
$appId=”[application id of the mailbox migration app you consented to]”
$scope=”[email address of the mail enable security group we created]”
$existingOrgRel = $orgrels | ?{$_.DomainNames -like $targetTenantId}
If ($null -ne $existingOrgRel)
{
Set-OrganizationRelationship $existingOrgRel.Name -Enabled:$true -MailboxMoveEnabled:$true -MailboxMoveCapability RemoteOutbound -OAuthApplicationId $appId -MailboxMovePublishedScopes $scope
}
If ($null -eq $existingOrgRel)
{
New-OrganizationRelationship “[name of your organization relationship]” -Enabled:$true -MailboxMoveEnabled:$true -MailboxMoveCapability RemoteOutbound -DomainNames $targetTenantId -OAuthApplicationId $appId -MailboxMovePublishedScopes $scope
}[/sourcecode]
Note: In place of [tenant id of your trusted partner, where the mails are being relocated to], type the tenant ID of the destination tenant. Replace [application id of the mailbox migration app you approved] with application id. Place the email address of the security group instead of [email address of the mail enabled security group we created]. Substitute [name of your organization relationship] with the name of the organization we created in the target tenancy.
After completing these steps create mail users in new tenant for the cross-tenant-migration. Let’s know how to do this.
Generate Mail Users in the Target Tenant
- Open Office 365 Target Tenant Account. Open admin center and Go to Exchange.
- Choose Recipients and click on Contacts then select add a mail user.
- Type all the basic details. In External Email column fill your existing email address then press the Next button as shown in the image.
- Recheck your details and then press the Create button.
Note: For each mailbox you want to migrate in target tenant, you must create a mail user.
How to locate the source mailbox’s ExchangeGuid and ExchangeLegacyDN
- Use the command mentioned below in PowerShell on existing tenant account.
[sourcecode]Get-Mailbox [Source Tenant Mailbox Address] | fl Name,ExchangeGuid,LegacyExchangeDN[/sourcecode]
Note: Run this command for each user to find their ExchangeGuid and ExchangeLegancyDN by replacing (Source Tenant Mailbox Address) with the email address of the source mailbox user.
- After running this command you can see all the details. Copy and Store the ExchangeGuid and ExchangeLegancyDN of the users one by one.
In Target Tenant, add ExchangeGuid and ExchangeLegacyDN
The source user mailbox’s ExchangeGuid and ExchangeLegacyDN must now be added in the target tenant users.
- Execute the below mentioned command in the Target PowerShell user to add ExchangeGuid.
[sourcecode]Set-MailUser -Identity [email address of the Target user] -ExchangeGuid [ExchangeGuid of the source user][/sourcecode]
- Add below command in Target PowerShell to add ExchangeLegancyDN.
[sourcecode]Set-MailUser -Identity [email address of the Target user] –EmailAddresses @{add=”x500:[LegacyExchangeDN of the Source user]”}[/sourcecode]
Note: For each user in the Target Tenant PowerShell, complete this step.
Check the availability of the migration server
- In Target Tenant PowerShell, enter the mentioned below command.
[sourcecode]Test-MigrationServerAvailability -EndPoint “[the name of your migration endpoint]” -TestMailbox “[Primary SMTP of Mail User object in target tenant]”[/sourcecode]
- If it’s showing failed then you probably missed something. But if it show the status as success then you are good to go further.
Give the target tenant’s mail users a license
- In new Tenant open Admin Center > Select users and then choose active users.
- Choose users which we selected before > Tick on three dots and choose Manage Product License.
- A new window is opened as Manage Product License select replace option > choose license and the press the save changes
It will assign the license to all the users within some time.
Creating a Migration Batch in the Target Tenant
- In the Target Tenant, go to Admin Center. Select the show all option and choose the exchange from the options.
- Select migration > click on add migration batch for adding the migration batches.
- Fill the name for migration batch > Choose migration to Exchange Online and then press the Next
- Choose cross-tenant migration in select the migration type option then press the next
- Now you can see some of the requirements for cross tenant migration in this window. We completed all the steps before so press the next
- In next window you have to select the migration endpoint which was created before with the PowerShell and then click on next
- Make a CSV file through excel, fill all the details as showing in the image to import the CSV file.
- In this window, import your CSV file and press on next
- Now fill the target delivery domain and press the next
- The window for scheduling migration batches is now open. Select automatically start the batch under start the migration batch. Click on the save button after choosing your time zone.
- Now the status of batch migration is successful. Press the Done
- In new window the migration batch is created and status is showing as syncing.
- For completing the status it takes some time according to the users and their data size. After completing it shows the status as completed.
Your user mailboxes have all been transferred to the target tenant, and you will also get an email when the cross-tenant migration is finished.
Conclusion
One of the difficult processes that most companies frequently have to complete during the mailbox migration between Office 365 Tenants is to perform Office 365 tenant to tenant migration. In this blog we have discussed how to complete the process of mailbox migration from one tenant to another in Office 365. You can ask your doubts in the comment section.
Read More: Migrate from Google workspace to Office 365