MigrationFox Docs

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 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

  1. In Google Cloud Console pick (or create) a project for the migration.
  2. 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.
  3. APIs & Services → Credentials → Create credentials → Service account. Give it a name like migrationfox-mail. It doesn't need any Google Cloud role.
  4. 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

  1. On the service account's page, copy the Unique ID (the numeric client ID).
  2. Open the Google Admin console as a super admin.
  3. Security → Access and data control → API controls → Manage domain-wide delegation.
  4. Add new, paste the Unique ID, and add these scopes (comma-separated):
https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/gmail.labels https://mail.google.com/ https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file

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:

Mail.ReadWrite (Application) User.Read.All (Application)

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:

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

  1. In your project, open the Migrate tab and click Start on the Mail card.
  2. Source: pick Gmail or Office 365 and the tenant-wide connection you added.
  3. Destination: pick Office 365 and the tenant-wide destination connection.
  4. Mailboxes: choose Paste / CSV mapping and paste or upload your list. The count of ready pairs and any invalid lines show under the box.
  5. Options: optionally set a Folder Filter (comma-separated folder names) and a From Date / To Date. These apply to every mailbox in the list.
  6. 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