Before you start
| Requirement | Why |
|---|---|
| Azure Automation account with PowerShell 7.4 runtime | Runs the script on a schedule. |
| System-assigned managed identity | Signs in without a stored password. |
| Exchange.ManageAsApp permission and an Exchange role for the identity | Lets the identity read migration batches. |
| ExchangeOnlineManagement module in the runtime | Provides Connect-ExchangeOnline. |
- 1
Turn on the managed identity
AzureOn the Automation account, switch the system-assigned identity on and note its object ID.
- 2
Grant Exchange access
TargetGive the identity the Exchange.ManageAsApp application permission on Office 365 Exchange Online, and assign it an Exchange admin role in Entra ID.
- 3
Write the runbook
AzureConnect with the managed identity, read every user in the batch, and export the result.
PowerShell · Azure Connect-ExchangeOnline -ManagedIdentity -Organization "harbor.onmicrosoft.com" $rows = Get-MigrationUser -BatchId $BatchName -ResultSize Unlimited | ForEach-Object { Get-MigrationUserStatistics $_.Identity | Select Identity, Status, PercentageComplete, ErrorSummary } $rows | Export-Csv "$env:TEMP\status.csv" -NoTypeInformation - 4
Schedule and deliver
AzureLink a daily schedule, then send the CSV to the project channel or mailbox.
Expected result: The report arrives at 09:00 with a row per user.
Get the next guide by email
The Cutover is a monthly email with new guides and what we learned on recent waves.
Related
Cross-tenant mailbox migration, end to end
The native Exchange Online path from trust setup to cutover, with every step, the PowerShell behind it and the checks that stop a wave failing on the night.
Moving OneDrive between tenants with the native tool
Trust, identity map, the move itself and the one rule that decides whether a user goes native or to a third-party tool.
Device migration between tenants: three paths and when to use each
There is no native button to move an Intune device to another tenant. How to choose between a reset, an Autopilot re-registration and a profile move, and the exact steps for each.
