Step 2: Establishing trust between the source and target tenants

This is Step 2 in a solution designed to complete a Cross-tenant OneDrive migration. To learn more, see Cross-tenant OneDrive migration overview.

After connecting to the source and target tenant, the next step in performing a cross-tenant OneDrive migration is establishing trust between the tenants.

To establish trust, each SharePoint tenant administrator must run specific commands on both source and target tenants. Once the trust has been requested, the administrator of the target tenant will receive an email informing them that another tenant is trying to establish a trust relationship.

Note

The "trust" command is specific to SharePoint. It only grants permission for the SharePoint administrator on the source tenant to execute OneDrive Migration operations to the identified target tenant.

Granting trust doesn't give the administrator any visibility, permission, or ability to collaborate between the source tenant and the target tenant.

Important

If you are Microsoft 365 Multi-Geo customer, you must establish trust between each geography involved in your migration project.

Before you begin

Before running the trust commands, obtain the cross-tenant host URLs for both the source and target tenants. You'll need these URLs when establishing the trust relationship between source-to-target and target-to-source.

To obtain the cross-tenant host URLs:

On both the source and target tenants, run:

Get-SPOCrossTenantHostURL

Example: Run command on Source tenant:

example of how to obtain host url for source

Example: Run command on target tenant:

example of how to obtain host url for target

Run the trust commands

These commands send a request to the tenant with whom you want to establish trust.

  1. On the source tenant, run this command to send a trust request to the target tenant:

    Set-SPOCrossTenantRelationship -Scenario MnA -PartnerRole Target -PartnerCrossTenantHostUrl <TARGETCrossTenantHostUrl>
    
  2. On the target tenant, run this command to send a trust request to the source tenant:

    Set-SPOCrossTenantRelationship -Scenario MnA -PartnerRole Source -PartnerCrossTenantHostUrl <SOURCECrossTenantHostUrl>
    

Parameter definitions

Parameter Definition
PartnerRole Roles of the partner tenant you're establishing trust with. Use source if partner tenant is the source of the OneDrive migrations, and target if the partner tenant is the Destination.
PartnerCrossTenantHostURL The cross-tenant host URL of the partner tenant. The partner tenant can determine this for you by running: Get-SPOCrossTenantHostURL on each of the tenants.

Sample trust email

The following in an example of the email that is sent to global admins:

example of trust email

Subject: SPO Tenant [https://a830edad9050849mnaus093022-my.sharepoint.com/] [setuporupdate] Organization Relation [Scenario=MnA, Role=Source] with us

Message: SPO Tenant [https://a830edad9050849mnaus093022-my.sharepoint.com/] [setuporupdate] Organization Relation [Scenario=MnA, Role=Source] with us

Step 3: Verify that trust has been established