Skip to main content

Tenant-to-Tenant Migration: The Domain Cutover That Keeps Downtime Under 30 Minutes

Nick Ross4 min read

TL;DR

  • You cannot add the same custom domain to two Office 365 tenants at once, so a tenant-to-tenant migration that keeps the domain requires planned downtime while you remove it from the source and recreate it in the destination.
  • Done correctly, downtime is limited to about 30 minutes; the bulk of the data moves beforehand via a prestage pass.
  • Pre-stage mail up to 60 days before cutover, then run a full pass for the remaining mail, calendars, contacts, notes, and rules; you can run up to 10 delta passes.
  • Removing the source domain means first bulk-updating every user UPN, alias, and group to the .onmicrosoft.com address via PowerShell, then recreating them on the .com domain in the destination.
  • BitTitan's Deployment Pro agent (DMA) reconfigures Outlook profiles after the move and is pushed by GPO or email; each device registers a one-to-one heartbeat with its user.

Mergers and acquisitions force tenant consolidation, and the moment you try to add the acquired company's domain to the surviving tenant, Office 365 stops you: the domain already exists in another Microsoft account. That constraint is what makes a same-domain tenant-to-tenant migration a downtime event rather than a background sync. The whole job is sequencing the work so the bulk of the data moves ahead of time and the actual outage stays around 30 minutes. This walks the full BitTitan sequence, with every PowerShell script.

Office 365 logo

Take the example of parent company A acquiring child company B. If you try to add company B's domain into parent company A, you get an error saying it already exists in another Microsoft account. So you must remove the primary domain from one tenant and recreate it in the other. Done correctly, downtime is limited to 30 minutes.

This is a high-level overview of the migration steps using BitTitan. For a complete step-by-step guide with screenshots, follow this BitTitan playbook (Office 365 to Office 365) (opens in new tab). While the guide is specific to BitTitan, the same concepts apply with any tool.

Set up the destination environment

Provision users in the destination tenant

They will be provisioned with the .onmicrosoft.com domain in this account. Options:

  • Add one at a time
  • Bulk upload via PowerShell
  • Bulk upload via CSV
  • Assign licenses

Stage the domain (do not verify it yet)

In the 365 Admin Center, go to Setup > Domains > Add Domains. Note: this is where you will add the domain and verify with a TXT record after you remove it from the source tenant. For now, users keep the .onmicrosoft.com address as their primary SMTP.

Bulk import users with passwords via PowerShell

text
Import-Csv -Path 'FilePath' | foreach {New-MsolUser -UserPrincipalName $_.UserPrincipalName -FirstName $_.FirstName -LastName $_.LastName -DisplayName $_.DisplayName -Password $_.Password -ForceChangePassword $False}

Set impersonation rights for the admin user

Connect to Exchange Online with PowerShell and run:

powershell
New-ManagementRoleAssignment -Role ApplicationImpersonation -User <admin_user_name>

Prepare source and destination for BitTitan

Set impersonation rights on both tenants

Note: you have to connect to the source 365 tenancy and destination 365 tenancy separately in PowerShell and run these commands in each session. Connect to Exchange Online with PowerShell and run:

powershell
New-ManagementRoleAssignment -Role ApplicationImpersonation -User <admin_user_name>

Raise the message size limit to 150 MB

powershell
Get-Mailbox | Set-Mailbox -MaxReceiveSize 150MB -MaxSendSize 150MB

Set up a BitTitan account

Create a login

Create a BitTitan username and password at bittitan.com (opens in new tab).

Create a customer

Enter the primary domain name and customer name.

Send out the agent to reconfigure Outlook profiles

Note: BitTitan includes a tool called Deployment Pro that reconfigures Outlook profiles after the migration. You can push it out by GPO or email.

Choose the delivery method

Decide whether to send the agent via GPO or email.

Track users with the agent installed

Devices register and match a user's email address to a computer in a one-to-one relationship. Each computer has a heartbeat.

Deployment Pro device tracking
Deployment Pro heartbeat status

Prepare migration endpoints

Set up source and destination endpoints

  • The source endpoint is found under Office 365.
  • The destination is Office 365.
  • Provide admin credentials for each endpoint.

Autodiscover users

  • Clean up the user list as needed.
  • Remediate UPN issues by clicking the pencil icon next to users.
  • The source should contain the .com address; the destination should contain the .onmicrosoft.com address.

Verify credentials

  • This tells you if there are errors.
  • The most typical errors are insufficient impersonation rights or wrong admin credentials.
  • It shows "Completed Verification" on success.

Subscribe users

  • Select all users, then click the last icon on the top toolbar with three lines.
  • "Apply User Migration Bundle."
  • Takes 3 to 5 minutes to propagate.

Start the migration

Run a prestage pass

Bring mail from the source tenant to Office 365 before removing the domain.

  • This brings over the bulk of the data before the domain is removed.
  • It only makes copies of the mail.
  • Set it prior to 60 days.
  • Any user whose status changes to "Failed" is almost 100% due to a server timeout; simply rerun those users.
Prestage pass running

Run a full pass

Bring over the remaining mail, calendars, contacts, notes, and rules.

  • Start once the prestage pass has completed.
  • You can run up to 10 delta passes.
  • Make sure everyone reaches a "Completed" status.

Remove the domain from the source tenant

This is the start of the downtime window.

Bulk-update all user UPNs to .onmicrosoft.com

To remove the domain, it must be removed from all records in the portal.

powershell
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -AllowClobber
$testpath = test-path c:\temp; If ($testpath -eq $false) {new-item -type directory c:\temp}; $dataout = @();
Get-MsolUser -All | ? {$_.UserPrincipalName -match "domain.com"} | % {Set-MsolUserPrincipalName -ObjectId $_.objectId -NewUserPrincipalName ($_.UserPrincipalName.Split("@")[0] + "@domain.onmicrosoft.com"); $dataout += "$($_.UserPrincipalName)" ; $_.UserPrincipalName };$dataout | out-file c:\temp\UPNChangeOutput.txt

Remove all aliases with the domain

powershell
$Records = Get-mailbox -ResultSize Unlimited| where {$_.emailaddresses -like "smtp:*@domain.com"} | Select-Object DisplayName,@{Name="EmailAddresses";Expression={$_.EmailAddresses |Where-Object {$_ -like "smtp:*domain.com"}}}
foreach ($record in $Records)
{
    write-host "Removing Alias" $record.EmailAddresses "for" $record.DisplayName
    Set-Mailbox $record.DisplayName -EmailAddresses @{Remove=$record.EmailAddresses}
}

Remove all groups with the domain

powershell
Get-MsolGroup -all | ?{$_.emailaddress -match "domain.com"} | Remove-MsolGroup -force

Remove the domain

  • The portal notifies you if any users or groups still have the domain attached.
  • Work with GoDaddy if you need additional assistance.

Recreate the domain in the destination tenant

These steps are basically the reverse of what you just performed in the source tenant.

Add the domain

  • In the destination 365 Admin Center, go to Setup > Domains > Add Domains.
  • Add the domain and verify with a TXT record (can take about 5 minutes before you can recreate).

Bulk-update all user UPNs back to .com

powershell
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -AllowClobber
$testpath = test-path c:\temp; If ($testpath -eq $false) {new-item -type directory c:\temp}; $dataout = @();
Get-MsolUser -All | ? {$_.UserPrincipalName -match "domain.onmicrosoft.com"} | % {Set-MsolUserPrincipalName -ObjectId $_.objectId -NewUserPrincipalName ($_.UserPrincipalName.Split("@")[0] + "@domain.com"); $dataout += "$($_.UserPrincipalName)" ; $_.UserPrincipalName };$dataout | out-file c:\temp\UPNChangeOutput.txt

Bulk-upload distribution lists

Create two CSVs:

  • One with the distribution group name and primary SMTP address.
  • One with the group name and the members of that group.
text
Import-Csv -Path 'File Path' | foreach {New-Distributiongroup -Name $_.Name -PrimarySmtpAddress $_.Address }
Import-Csv 'File Path' | foreach {Add-DistributionGroupMember -Identity $_.DL -Member $_.Alias}

Post-migration cleanup

Confirm the DMA agent ran

  • DMA status goes to "Completed" after successful authentication by the end user.
  • Any user who fails authentication three times goes into an "error" status.
  • Reschedule those users and make sure they have the correct 365 password.
DMA agent completion status

Give mobile users reconfiguration guides

Mobile users can set up their mailbox on their phone with these guides:

The sequence is what protects the clock: prestage the bulk of the mail, run deltas until everyone is current, and only then open the downtime window for the domain swap. The consolidated tenant that comes out the other side has twice the users, twice the groups, and twice the chances that something got misconfigured under deadline pressure, which is the right moment to set a clean baseline rather than assume one.

Frequently asked questions

Why does a same-domain tenant-to-tenant migration require downtime?

Because you cannot add the same custom domain to two Office 365 tenants simultaneously. Adding the child company's domain to the parent tenant returns an error that it already exists in another Microsoft account. You must remove the domain from the source tenant and recreate it in the destination, and that gap is the planned downtime.

How long is the downtime?

If done correctly, downtime is limited to about 30 minutes. The prestage pass moves the bulk of the mail before the domain is removed, so only the final delta and the domain cutover happen during the window.

What handles the Outlook profile reconfiguration after migration?

BitTitan's Deployment Pro tool (the DMA agent) reconfigures Outlook profiles after the migration. You push it by GPO or email. Each device registers and matches a user's email to a computer in a one-to-one relationship with a heartbeat, and a user who fails authentication three times goes into an error status to be rescheduled.

Start the consolidated tenant on a clean security baseline

A merger doubles the attack surface and the chance that something was misconfigured in the rush. CloudCapsule scores the destination tenant against 250+ controls in 60 seconds, so the consolidated environment is hardened from day one, not whenever someone gets to it.

Run a free scan
Nick Ross

Written by

Nick Ross

CEO · Microsoft MVP · Founder, T-Minus 365

Nick is not just a CEO, he's a respected thought leader and influencer in the MSP space. Tens of thousands of MSPs learn through his YouTube channel, T-Minus365. Nick has been honored as a three-time Microsoft MVP for his educational content; his expertise and influence are the backbone of our mission, ensuring that you are in the best hands when it comes to security.

Nick joined Pax8 in 2017, where he would ultimately oversee product management for PSA and Microsoft integrations. Following his tenure at Pax8, Nick has continued to demonstrate his leadership prowess as an executive at various MSPs, culminating in his most recent role at Sourcepass.

Nick holds a Bachelor's Degree in Business Management from Florida State University, as well as a Minor Degree in Entrepreneurship. In his free time, Nick is an avid hiker, reader, and fitness-junkie.

Keep reading