Bulk Mail Migration with User Mapping
Move many mailboxes in one migration by pasting or uploading a list of source and destination addresses. Bulk mode reads from Gmail (Google Workspace) or Microsoft 365 and writes into Microsoft 365 (Exchange Online).
Private beta
Mail migration is in private beta. If your account shows “Coming Soon · Private Beta” on the Mail page, email hello@migrationfox.com to request access. The wizard offers Gmail and Microsoft 365 mailboxes only. Exchange (EWS) and IMAP are not offered.
Attachment files are not copied by default
Messages are copied with their subject, body, sender, recipients, date and folder (or label), but attachment files are left out unless attachment copying has been turned on for the service that runs your migration. It is off by default while the rollout finishes, and the Include Attachments option in the wizard does not override it. If you need attachments, contact support@migrationfox.com before you start. When it is on and the destination is Microsoft 365, an attachment over 3 MB, or one that would push a message past 25 MB of attachments, is skipped and named in an X-Migration-Note header on that message.
Mapping format
In the wizard's Mailboxes step, choose Paste / CSV mapping. Paste pairs into the box, or click Upload CSV (a Template link downloads a sample). Each line is one source mailbox and the destination mailbox its mail goes to:
sourceEmail,destEmail jane.doe@source-domain.com,jane.doe@dest-domain.com raj.patel@source-domain.com,raj.patel@dest-domain.com finance-archive@source-domain.com,finance@dest-domain.com
Rules:
- The header row is optional. A first line that starts with “source” or “from” is treated as a header and skipped.
- The two addresses can be separated by a comma, a tab, spaces, or
->. Only the first two values on a line are used; extra columns are ignored. - Blank lines and lines starting with
#are ignored. Addresses are converted to lowercase. - Lines that don't contain two valid email addresses are listed under the box (with their line number) and left out. The rest can still run.
- Every source mailbox needs an explicit destination on its line, even when the addresses are identical.
The right column is a mailbox, not an alias
The left column is the mailbox MigrationFox reads. The right column is the destination mailbox the messages are written into. It is not a forwarding alias or a sender rewrite. Use the destination user's actual address (UPN). If a destination mailbox doesn't exist, that pair fails and the error appears in the migration's log.
If your source is Microsoft 365, the Pick users from my tenant option is an alternative to a CSV: search and check off mailboxes, then click Auto-match. Auto-match tries the exact address first, then the username (the part before the @) in the destination tenant, and lets you type a destination for anyone it can't match.
Source requirements: Gmail
Bulk mode with a Gmail source needs a Google service account with domain-wide delegation. A Gmail sign-in (“Just my own mailbox”) only gives access to the account that signed in, so it can't read other users' mail. The service account is what lets one connection read every mailbox in your Workspace.
1. Create the service account
- In Google Cloud Console pick (or create) a project for the migration.
- Enable the Gmail API and the Google Drive API on the project (APIs & Services → Library). MigrationFox checks the connection through Drive when you save it.
- APIs & Services → Credentials → Create credentials → Service account. Give it a name like
migrationfox-mail. It doesn't need any Google Cloud role. - On the service account's page, open the Keys tab and click Add key → Create new key → JSON. Keep the downloaded file somewhere safe.
2. Authorize domain-wide delegation
- On the service account's page, copy the Unique ID (the numeric client ID).
- Open the Google Admin console as a super admin.
- Security → Access and data control → API controls → Manage domain-wide delegation.
- Add new, paste the Unique ID, and add these scopes (comma-separated):
MigrationFox requests the four Gmail scopes together when it opens a mailbox, and Google refuses the request if any one of them isn't authorized, so add all of them. The two Drive scopes are used for the connection check when you save the connection.
3. Add the connection in MigrationFox
In your project, open the Connect tab, click Gmail / Workspace Mailboxes, and choose Multiple users in my Workspace. Paste the JSON key and enter an Impersonate Email (an address in your Workspace domain, such as an admin). That address is used to check the connection. In bulk mode, each line's source address is the mailbox that gets read.
Source requirements: Microsoft 365
To read several Microsoft 365 mailboxes, use a tenant-wide (app-only) connection: on the Connect tab click Microsoft 365 Mailboxes and choose Multiple users in my tenant or Bring your own Azure app. Both are described below.
Destination requirements: Microsoft 365
The destination needs a tenant-wide (app-only) connection, so MigrationFox can write into each destination mailbox by address without each user signing in. On the Connect tab, click Microsoft 365 Mailboxes and choose one of:
- Multiple users in my tenant: a Global Administrator grants admin consent to the MigrationFox Mail app once. That app's only Application permissions are
Mail.ReadWriteandUser.Read.All. - Bring your own Azure app: register your own app with the same two Application permissions and paste its client ID, secret and tenant ID. See Mail Migration: Service-Account Setup for the steps.
The Just my own mailbox sign-in uses delegated permissions, which only cover the signed-in user's own mailbox (and mailboxes shared with them). It can't be used for bulk mode.
Optional: limit the app to specific mailboxes
Mail.ReadWrite as an Application permission covers every mailbox in the tenant. To restrict it to the mailboxes in your list, create an application access policy in Exchange Online PowerShell (New-ApplicationAccessPolicy) that ties the app to a mail-enabled security group containing just those users. Do this after a one-mailbox test so you know the connection works first.
Per-user destination prerequisites
For each line in your list, the destination user must already:
- Exist in the destination tenant with the exact address in the
destEmailcolumn. MigrationFox does not create users or mailboxes. - Be licensed with an Exchange Online plan (for example E1, E3, E5, Business Basic/Standard/Premium, or Exchange Online Plan 1/2).
- Have a provisioned mailbox. A newly licensed user's mailbox can take a while to appear; a pair whose mailbox doesn't exist yet fails.
A good pre-flight is to run Get-Mailbox -Identity <destEmail> in Exchange Online PowerShell for every line before you start. Any address that returns nothing needs a license or more time.
Gmail as a destination is single-mailbox only
Bulk mode writes into Microsoft 365. Gmail can be chosen as a destination for a single mailbox, but don't use a Gmail destination with a bulk list.
Running a bulk migration
- In your project, open the Migrate tab and click Start on the Mail card.
- Source: pick Gmail or Office 365 and the tenant-wide connection you added.
- Destination: pick Office 365 and the tenant-wide destination connection.
- Mailboxes: choose Paste / CSV mapping and paste or upload your list. The count of ready pairs and any invalid lines show under the box.
- Options: optionally set a Folder Filter (comma-separated folder names) and a From Date / To Date. These apply to every mailbox in the list.
- Review: check the first rows of the mapping and click Start migration.
The list runs as one migration that works through the mailbox pairs one after another. A pair that fails (no license, mailbox not found, missing permission) is recorded in the migration's log and the next pair starts. The migration ends as Completed if at least one pair succeeded, and as Failed only if every pair failed. To retry the failed pairs, start a new migration with just those lines.
Related
- Mail Migration overview
- Mail Migration: Service-Account Setup (your own Azure app for Microsoft 365)
- Common errors: Authentication expired, 403, 429