Fix Cross-Tenant Exchange Online Mailbox Migration Failures
Question details
Administrators experience failures when attempting cross-tenant mailbox migrations between two Microsoft 365 tenants due to using incorrect on-premises configurations.

- Product
- Exchange Online
- Device & OS
- not provided
- Scenario
- Migrating mailboxes directly between two Exchange Online tenants without an on-premises Exchange server.
- Observed behavior
- Migration PowerShell scripts and commands like Set-WebServicesVirtualDirectory fail because they are designed exclusively for on-premises Exchange environments.
Ensure you have global administrator or Exchange administrator privileges for both the source and target Microsoft 365 tenants before initiating the migration process.
Implement the Microsoft 365 Cross-Tenant Mailbox Migration Process
Apply the official tenant-to-tenant migration process instead of legacy on-premises Exchange commands.
When migrating between two Exchange Online environments without an on-premises Exchange server, standard IMAP and MRS Proxy configurations (like Set-WebServicesVirtualDirectory) will not work. You must establish a proper tenant-to-tenant organizational relationship.
Navigate to the Microsoft 365 admin center and verify that both the source and target tenants are strictly Exchange Online environments.
Stop using the 'Set-WebServicesVirtualDirectory' PowerShell command, as it is only applicable to on-premises servers and will trigger connectivity failures in Exchange Online.
Establish the required Azure AD applications and cross-tenant access settings between the source and target tenants following Microsoft's official cross-tenant migration guide.
Create MailUser objects in the target tenant and assign the appropriate Exchange Online PowerShell execution rights to the migration administrator accounts.
Run the authorized cross-tenant migration PowerShell scripts to initiate and finalize the mailbox transfers.

Boost Your Team's Productivity with WPS Office
While managing complex Microsoft 365 migrations, consider providing your users with a lightweight, cost-effective alternative for their daily document needs. WPS Office offers seamless compatibility, a familiar interface, and cross-platform support to keep your business running smoothly during tenant transitions.
- 1. Download the software: Visit the official WPS Office website to download the free installation package for your operating system.
- 2. Install and deploy: Run the lightweight installer and follow the on-screen instructions to deploy the software across your users' devices.
- 3. Open existing files: Launch WPS Office and directly open existing Microsoft Office documents with zero formatting loss.

Frequently Asked Questions
Why does the Set-WebServicesVirtualDirectory command fail in Exchange Online?
This command is specifically designed for on-premises Exchange Server configurations. Exchange Online manages web services automatically in the cloud, so this command is neither applicable nor available for tenant administrators.
Can I use IMAP migration for a Microsoft 365 cross-tenant transfer?
While it is technically possible for basic email transfer, IMAP migration is highly discouraged for Exchange Online tenant-to-tenant migrations because it fails to migrate calendar events, tasks, contacts, and complex folder rules.
What permissions are required for a cross-tenant mailbox migration?
Administrators must configure Azure AD applications, assign specific Migration Administrator roles, and establish formal organizational relationships and security permissions between the source and target Microsoft 365 tenants.




