1. Executive Summary & Objective
This operational document defines the complete procedure for migrating Google Workspace data across separate tenants and swapping domain names without password collection or service downtime.
Data Scope: Gmail (RFC822 dates & user labels), Google Drive (full folder hierarchies, binary files & native Google Docs conversion), Google Contacts, and Google Calendar.
2. Roles & Prerequisites
| Role / Requirement |
Description |
Status |
| Source Tenant Admin |
Super Admin credentials on source Google Workspace account |
Verified |
| Destination Tenant Admin |
Super Admin credentials on destination Google Workspace account |
Verified |
| DNS Authority |
Ability to create TXT verification records for holding and primary domains |
Verified |
| Migration Web Console |
Access to console at http://YOUR_SERVER_IP/ or http://localhost:8080/ |
Active |
2.1 Passwordless Console Authentication & Roles
The Migration Console uses a pure white enterprise design with passwordless token authentication:
- Sign In: Access via personal Access Token or Magic Link (
/?token=...) or registered email lookup.
- Sign Up: Self-service registration generating an instant secure token and direct magic link.
- Administrator Role (2 Focused Options Only): (1) Service Account & DWD (Upload key, copy 21-digit Client ID & scopes, set domains), and (2) Users & Progress (Organization statistics, live migration progress table, operator tokens).
- Operator Role (Interactive 3-Step Wizard): (1) Find all source users, (2) Check & fetch destination accounts, and (3) Select specific services (
Mail, Drive, Contacts, Calendar) per user to map and migrate.
3. The 8-Stage Execution Runbook
Stage 1: Connect Service Account & Authorize Domain-Wide Delegation
Key Concept: A single Service Account Client ID is authorized across BOTH tenants in Google Admin Console. This allows automated API impersonation without user passwords.
- Open the Migration Web Console in your browser.
- Enter your Old Primary Domain, New Tenant Domain, and Holding Domain, then click Save Domains.
- Under Connect Google Service Account, upload the Service Account
.json key file (or run bash create_service_account.sh).
- Click Copy Client ID and Copy Scopes.
- Log into Google Admin Console (
admin.google.com) for BOTH tenants:
- Go to: Security ➔ API Controls ➔ Manage Domain-wide Delegation ➔ Add new.
- Paste the Client ID and Scopes, then click Authorize.
- In the Web Console, click Test Connection to confirm green checks.
https://mail.google.com/,https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/contacts,https://www.googleapis.com/auth/contacts.other.readonly,https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/admin.directory.group
Stage 2: Pilot Sandbox Test (1 User First)
Best Practice: Always test with 1 pilot account to verify emails, drive folders, contacts, and calendar before touching all accounts.
- In the green Pilot Test with 1 User First section:
- Enter Source test user (e.g.
pilot@primarydomain.com) and Destination test user (e.g. pilot@justanydomain.com).
- Click Run Pilot Test.
- Log into the destination test mailbox to verify data integrity:
- Gmail: Original received dates and labels preserved.
- Drive: Folder tree and files accessible.
- Contacts: Phone numbers, notes, and emails populated.
- Calendar: Events and recurring meetings populated without invite spam.
Stage 3: Auto-Provision Accounts in Destination Tenant
- In Phase 1 of the Web Console, click Auto-Provision Users.
- The system automatically reads all source accounts and creates matching users in the destination tenant with identical display names, given names, family names, and secure temporary passwords.
Stage 4: Execute Full Organization Data Migration
- In Phase 2 of the Web Console, click Auto-Discover All Users.
- Click Start Full Migration.
- The multi-threaded worker pool transfers all accounts concurrently with real-time SQLite checkpointing.
- If any items pause due to API quotas, click Retry Failures (safely skips already completed items).
Stage 5: Add Temporary Holding Domain to Source Tenant
- In the Source Tenant Google Admin Console, go to: Account ➔ Domains ➔ Manage domains.
- Click Add a domain and enter your holding domain (e.g.
thirddomain.com) as a Secondary domain.
- Complete TXT DNS verification to activate it.
Stage 6: Rename Source Users & Strip Aliases
Important: Google automatically leaves the old email as an alias when renaming a user. These aliases MUST be deleted, otherwise Google will not allow the primary domain to be removed.
- In Phase 3 of the Web Console, click Rename Source & Strip Aliases.
- The system renames all users:
user@primarydomain.com ➔ user@thirddomain.com and immediately deletes the alias user@primarydomain.com.
Stage 7: Audit & Delete Primary Domain from Source Tenant
- In the Web Console, click Verify Release.
- Confirm that Blocking Users, Aliases, and Groups all equal 0.
- In Source Google Admin Console, go to Account ➔ Domains ➔ Manage domains, locate
primarydomain.com, and click Remove / Delete.
Stage 8: Add Primary Domain to Destination & Final Rename
- In Destination Google Admin Console, go to: Account ➔ Domains ➔ Manage domains.
- Click Add a domain and add
primarydomain.com as a Secondary domain. Verify DNS.
- In Phase 3 of the Web Console, click Finalize User Rename.
- All destination users are switched to
user@primarydomain.com. The migration is complete!
4. Sign-Off & Verification Table
| Stage |
Lead Responsible |
Verification Status |
Date Completed |
| Stage 1: DWD Scopes Configured |
Super Admin |
[ ] Passed |
_____________ |
| Stage 2: Pilot User Validated |
QA / Operator |
[ ] Passed |
_____________ |
| Stage 3: Accounts Provisioned |
Operator |
[ ] Passed |
_____________ |
| Stage 4: Data Migration 100% |
Migration Engineer |
[ ] Passed |
_____________ |
| Stage 5: Holding Domain Active |
Source Admin |
[ ] Passed |
_____________ |
| Stage 6: Source Users Renamed |
Operator |
[ ] Passed |
_____________ |
| Stage 7: Primary Domain Released |
Source Admin |
[ ] Passed |
_____________ |
| Stage 8: Final Destination Rename |
Dest Admin |
[ ] Passed |
_____________ |
Approved by Project Lead:
Signature & Date
Approved by Super Administrator:
Signature & Date