Launch offer: 20% off every migration plan until 31 January 2027. See prices
//Exchange → Microsoft 365
9 min read
Hybrid·Cross-Platform

Exchange → Microsoft 365

Migrate on-premises Exchange mailboxes to Exchange Online using EWS impersonation and multi-pass cutover.

Exchange to Microsoft 365 Migration Guide

Migrate from Microsoft Exchange Server (on-premises) directly to Microsoft 365 Exchange Online. This guide covers hybrid migrations and cutover migrations for organisations moving their full mail infrastructure to the cloud.


Prerequisites

Source environment (Exchange On-Premises)

  • Exchange Server 2013, 2016, or 2019
  • Global Administrator (Active Directory) or Exchange Organization Management role
  • Exchange Web Services (EWS) accessible from the Aatrex host (typically port 443 to your EWS endpoint)
  • Autodiscover DNS configured and resolving correctly
  • A service account with ApplicationImpersonation rights (see Step 1)

Destination tenant

  • Microsoft 365 Global Administrator role
  • Exchange Online Plan 1 or Plan 2 licences for all target users
  • Target user accounts provisioned — via Azure AD Connect sync, manual creation, or bulk import

Network requirements

  • Aatrex must be able to reach your Exchange EWS endpoint (e.g. https://mail.yourtenant.com/EWS/Exchange.asmx)
  • If your Exchange server is behind a firewall, add the Aatrex service IP addresses to your allowlist

Step 1: Create a Service Account with Impersonation Rights (Source)

Aatrex uses Exchange Web Services (EWS) with application impersonation to access source mailboxes — no individual user passwords are required.

  1. On your Exchange server or via Exchange Management Shell, create a dedicated service account:
New-Mailbox -Name "AatrexMigration" -UserPrincipalName aatrex-migration@yourtenant.com -Password (ConvertTo-SecureString "StrongPassword!" -AsPlainText -Force) -ResetPasswordOnNextLogon $false
  1. Grant the ApplicationImpersonation management role:
New-ManagementRoleAssignment -Name "AatrexImpersonation" -Role ApplicationImpersonation -User aatrex-migration@yourtenant.com
  1. Verify the assignment:
Get-ManagementRoleAssignment -RoleAssignee aatrex-migration@yourtenant.com | Format-List
  1. Note the service account UPN and password — you will enter these into Aatrex.

Step 2: Register an App in the Destination Tenant (Microsoft 365)

The destination is Microsoft 365 Exchange Online. Aatrex uses the Microsoft Graph API to write data into the destination mailboxes.

  1. Sign in to portal.azure.com as a Global Administrator on the destination tenant.
  2. Go to Azure Active Directory → App registrations → New registration.
  3. Name it Aatrex Exchange Destination and click Register.
  4. Copy the Application (client) ID and Directory (tenant) ID.
  5. Generate a Client secret and copy the value.
  6. Add the following Application permissions under Microsoft Graph:
PermissionWhy it is needed
Mail.ReadWriteImport messages into destination mailboxes
Calendars.ReadWriteCreate calendar events
Contacts.ReadWriteCreate contacts
MailboxSettings.ReadWriteRestore auto-reply and timezone settings
User.Read.AllResolve destination UPNs
  1. Click Grant admin consent and confirm all permissions show Granted.

Step 3: Create a Migration Project

  1. In Aatrex, click Projects → Create Project.
  2. Select Exchange to M365 Migration as the migration type.
  3. Enter a project name and the destination tenant domain.
  4. On the Source step:
    • Connection type: Select Exchange EWS
    • EWS URL: Enter your Exchange Web Services endpoint (e.g. https://mail.yourtenant.com/EWS/Exchange.asmx)
    • Service account UPN: Enter the impersonation account created in Step 1
    • Password: Enter the service account password
  5. On the Destination step, paste the App ID, Tenant ID, and Client Secret from Step 2.
  6. Click Test Connection to verify connectivity to both the EWS endpoint and the destination Graph API, then click Save Project.

Step 4: Discover Mailboxes

  1. Open your project and click Scan → Discover Users.
  2. Aatrex queries Active Directory via the service account to enumerate mailboxes in the Exchange organisation.
  3. The user list populates with each mailbox's Display name, UPN, Mailbox size, and Last logon date.

If discovery returns fewer users than expected, check that the service account has ApplicationImpersonation rights applied at the organization level (not scoped to a specific database or OU).


Step 5: Map Source Mailboxes to Destination Accounts

  1. Click Auto Map — Aatrex matches by UPN username (the part before @).
  2. If source UPNs differ from destination UPNs (common in domain consolidation scenarios), upload a CSV with explicit source-to-destination pairs using Scan → Import CSV.
  3. Resolve any unmatched mailboxes manually via the user detail panel.

Step 6: Start the Migration

  1. Select users and click Migrate.
  2. Choose a migration mode:
    • Full migration — copies all mail, calendar events, contacts, and tasks from the source mailbox.
    • Date range — copies items received after a specified date. Use this for pre-migration passes to reduce the final delta window.
  3. Optionally enable Migrate tasks if Outlook tasks are important for your users.
  4. Click Start Migration.

Step 7: Delta Passes Before Cutover

Exchange migrations typically run in multiple passes:

  • Pass 1: Full migration of all historical data (may take several days for large mailboxes).
  • Pass 2: Incremental — only items added since Pass 1 (hours before cutover).
  • Pass 3: Final delta — run immediately before MX record cutover (minutes before).

Schedule passes from the Migration schedule panel on the project settings page.


Step 8: Cutover

When ready to cut over to Microsoft 365:

  1. Disable the source mailboxes or set them to forward-only in the Exchange admin centre to prevent new mail landing in the source.
  2. Run a final delta migration pass to capture any mail received during the migration window.
  3. Update the MX record for your domain to point to Microsoft 365 (yourdomain-com.mail.protection.outlook.com).
  4. Update Autodiscover DNS to point to Microsoft 365.
  5. Allow 24–48 hours for DNS TTL to propagate globally.

Post-Migration Verification

  • Sign in to Outlook on the Web at outlook.office.com for a migrated user and verify Inbox, Sent Items, and calendar are intact.
  • Send a test email to the migrated domain and confirm it arrives in Microsoft 365.
  • Confirm Outlook desktop clients reconnect automatically via Autodiscover.

Common Issues

EWS connection refused Check that port 443 is open to the Aatrex host IP from your Exchange server. Verify the EWS URL is correct by browsing to it in a browser — you should see an XML response.

ApplicationImpersonation fails for specific mailboxes Some mailboxes may be on a different Exchange database with a scoped impersonation assignment. Apply the role at the Organisation level to cover all databases.

Migration completing but missing recent emails A delta pass should be run closer to cutover. Mail received during the migration window requires a final incremental pass immediately before MX cutover.

Autodiscover pointing to on-premises after cutover Update the Autodiscover CNAME DNS record to autodiscover.outlook.com and flush the DNS cache on client machines.

PreviousDistribution List MigrationNext Google Workspace → Microsoft 365

Related articles