How to Migrate Microsoft 365 to Microsoft 365

The method to migrate Microsoft 365 to Microsoft 365 involves moving, restructuring, or consolidating user data and services within the Microsoft environment. It does not require leaving your Microsoft cloud environment. Instead, you will simply change the way you organize, configure, or manage your profile. Cross-tenant migration is a viable method for this purpose. Let’s learn more about this migration method and find out how it works.

What Is a Cross-Tenant Migration?

This method shifts Exchange Online mailboxes from one Microsoft 365 tenant (source tenant) to a different Microsoft 365 tenant (target tenant). It adopts a cloud-to-cloud approach to execute this process. The need for migration occurs mostly because of a major change in an organization, such as:

  • Acquisition
  • Merger
  • Divestiture

The method depends entirely on:

  • The Exchange Online Mailbox Replication Service (MRS) API
  • Azure enterprise applications registered within cloud-only directory environments

This migration method enables tenant admins to use Exchange Online PowerShell and MRS to move users to their new organization.

What Are the Major Prerequisites for Migrating M365 to M365?

Before preparing the source and target tenants for cross-tenant migration, you should have the requisite permissions to configure the Move Mailbox application in:

  • Azure
  • Exchange Online Migration Endpoint
  • Exchange Online Organization Relationship

Here are the other major aspects to consider before moving ahead with the migration:

  • Domain — Verify the target domain and allow time for DNS propagation before starting the process.
  • Identity mapping — Decide the UPNs, SMTP addresses, and authentication method for every user, whether cloud-only or hybrid.
  • Target tenant — Create user, room, group, and resource objects in the target tenant.
  • Workload listing — List every workload, including Exchange Online, Microsoft Teams, SharePoint, and OneDrive.
  • Check identities — Check users, groups, public folders, and domains, and remove duplicates.
  • Licensing — Ensure that users have the requisite workload, Exchange Online, and Teams licenses.
  • Compliance — Check compliance and security settings in both M365 environments, including multifactor authentication, audit needs, administrative roles, security groups, etc.
  • Network planning — Check available bandwidth, firewall rules, M365 endpoints, service limits, etc.

Steps to Migrate Microsoft 365 to Microsoft 365

After fulfilling all the points in the checklist, follow the steps below to perform the cross-tenant M365 to M365 migration.

1. Prepare the Target Tenant Application

To get the destination tenant ready, you will need to create the migration application and secret as shown below:

  • Log in to your Microsoft Entra admin center with target tenant administrator credentials.
  • Look for Manage Microsoft Entra ID and choose View.
  • Select App registrations in the navigation pane.
  • Click New Registration to see the Register an Application page.
  • Under Supported account types, select the second option: Accounts in any organizational directory (Any Microsoft Entra directory – Multi-tenant).
  • Under Redirect URI (optional), select Web, and type https://office.com.
  • Select Register.
  • Navigate back to the Home page > Microsoft Entra ID > App registrations.
  • Look for Owned Applications and select the app you created.
  • Look for Essentials and copy the Application (client) ID. You will need this ID to create the target tenant URL.
  • In the navigation pane, click API Permissions to check the permissions assigned to your app.
  • Remove the User.Read permission, as it is assigned by default and is not required.
  • Next, click Add a permission to add permission for mailbox migration.
  • Look for the Request API permissions window and click APIs my organization uses.
  • Search and select Office 365 Exchange Online > Select Application Permissions.
  • Navigate to Select permissions > Mailbox > Mailbox.Migration > Add permissions.
  • In the navigation pane, select Certificates & secrets for your application.
  • Click New client secret under Client Secrets.
  • In the resulting Add a client secret window, enter the description and configure expiration settings.

After successfully creating the migration application and secret, the next step is to grant consent to the application.

2. Grant Application Consent

  • Open the Microsoft Entra ID landing page.
  • From the navigation pane, select Enterprise applications.
  • Search and select the migration app you created earlier > Select API permissions.
  • Click Grant admin consent for [your tenant] to open a new browser window > Click Accept.
  • Navigate back to your portal window and click Refresh to confirm your acceptance.
  • Create the URL to send to the trusted source tenant administrator. This will allow them to accept the application and enable mailbox migration.

Here is an example of the URL you will provide to the source tenant admin: https://login.microsoftonline.com/contoso.onmicrosoft.com/adminconsent?client_id=[application_id_of_the_app_you_just_created]&redirect_uri=https://office.com

3. Prepare the Target Tenant’s Migration Endpoint

In this step, you need to create the Exchange Online migration endpoint along with the organization relationship. For this task, you will require two things:

  • The Application ID of the mailbox migration app
  • The password (secret) you configured earlier

The steps are as follows:

  • Open the target Exchange Online tenant.
  • Connect to Exchange Online PowerShell.
  • Create a new migration endpoint to facilitate cross-tenant mailbox migration. Follow the PowerShell code as shown in the screenshot below.
  • Next, edit your existing organization relationship object for your source tenant. If it does not exist, create a new one. Follow the PowerShell code below for this step.

4. Prepare the Source Tenant

In this step, you need to prepare the source tenant, or the location of the current mailbox. This requires you to do two things:

  • Accept the migration application
  • Configure the organization relationship

Here are the steps to follow:

  • Use your browser to navigate to the URL provided by your trusted partner to grant consent to the mailbox migration application.
  • When the pop-up appears, accept the application.
  • You may also find the application under Enterprise applications after signing in to your Microsoft Entra admin center account.
  • Connect to Exchange Online PowerShell on the source tenant.
  • Next, edit your existing organization relationship object for your target tenant. If it does not exist, create a new one. Follow the PowerShell code below for this step.

5. Prepare Target User Objects for Migration

Before you perform this task, you have to satisfy several prerequisites for target user objects.

  1. Required attributes for the target MailUser

The target MailUser must have several attributes from the source mailbox. Alternatively, these may be assigned to a new User object:

  • ExchangeGUID (direct flow from source to target): Must match the mailbox GUID.
  • ArchiveGUID (direct flow from source to target): Must match the archive GUID.
  • LegacyExchangeDN: Must exist on the target MailUser as an x500 proxyAddress.
  • UserPrincipalName (UPN): Should align with the target company or the new identity of the user.
  • Primary SMTP Address: Should align with the new company of the user.
  • ExternalEmailAddress (TargetAddress): Should reference the current mailbox of the user hosted in the source tenant (e.g., user@apollo.onmicrosoft.com). This attribute is what allows the MailUser to reference the user’s current mailbox in the source tenant.
  1. Attributes for Exchange hybrid write-back

The Exchange hybrid write-back should also include the following attributes, to write back blocked sender, safe recipient, and safe sender data from Exchange Online clients to on-premises Active Directory:

  • msExchBlockedSendersHash
  • msExchSafeRecipientsHash
  • msExchSafeSendersHash
  1. GUID consistency check

The target MailUser should have no previous ExchangeGUID that mismatches the source ExchangeGUID.

After fulfilling these points, the target user objects are ready for migration.

6. Verify the Migration

You can verify whether this Microsoft 365 to Microsoft 365 migration method worked by running the Test-MigrationServerAvailability cmdlet. Run this command against the migration endpoint created on your target tenant, as shown below:

Test-MigrationServerAvailability -EndPoint “[the name of your migration endpoint]” -TestMailbox “[Primary SMTP of MailUser object in target tenant]”

This cmdlet checks whether the configurations of the target MailUser and the migration endpoint are correct and can support the mailbox migration.

Using an Exchange Migration Tool to Migrate Microsoft 365 to Microsoft 365

As you can infer, the entire process for M365 to M365 migration through the cross-tenant method is quite cumbersome. The same holds true for other manual Exchange Online migration methods. In addition, these migration methods are likely to encounter errors because of incorrect PowerShell code or a missed step. Moreover, executing the involved commands requires in-depth technical knowledge along with practical expertise. To avoid these hassles, you can use an Exchange migration tool.

Conclusion

The need to migrate Microsoft 365 to Microsoft 365 arises for several reasons within an organization. For example, in the case of a merger, acquisition, or divestiture, companies need to preserve their mailboxes for their intended users or employees. Cross-tenant migration is one such method, which migrates mailboxes from the source tenant to a separate target tenant. However, this entire process is lengthy, prone to error, and requires detailed technical knowledge along with practical experience. An Exchange migration tool such as Stellar Migrator for Exchange, RecoveryTools Exchange Migration Tool or Shoviv Exchange Migration Tool, avoids the hassles of manual methods, allowing you to migrate Microsoft 365 to Microsoft 365 easily and in comparatively less time.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.