Standard Operating Procedure (SOP)

Google Workspace Cross-Domain Tenant Migration & Domain Swap

Version 2.0 • Production

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:

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.
  1. Open the Migration Web Console in your browser.
  2. Enter your Old Primary Domain, New Tenant Domain, and Holding Domain, then click Save Domains.
  3. Under Connect Google Service Account, upload the Service Account .json key file (or run bash create_service_account.sh).
  4. Click Copy Client ID and Copy Scopes.
  5. 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.
  6. 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.
  1. In the green Pilot Test with 1 User First section:
  2. Enter Source test user (e.g. pilot@primarydomain.com) and Destination test user (e.g. pilot@justanydomain.com).
  3. Click Run Pilot Test.
  4. 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

  1. In Phase 1 of the Web Console, click Auto-Provision Users.
  2. 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

  1. In Phase 2 of the Web Console, click Auto-Discover All Users.
  2. Click Start Full Migration.
  3. The multi-threaded worker pool transfers all accounts concurrently with real-time SQLite checkpointing.
  4. 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

  1. In the Source Tenant Google Admin Console, go to: Account ➔ Domains ➔ Manage domains.
  2. Click Add a domain and enter your holding domain (e.g. thirddomain.com) as a Secondary domain.
  3. 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.
  1. In Phase 3 of the Web Console, click Rename Source & Strip Aliases.
  2. 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

  1. In the Web Console, click Verify Release.
  2. Confirm that Blocking Users, Aliases, and Groups all equal 0.
  3. 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

  1. In Destination Google Admin Console, go to: Account ➔ Domains ➔ Manage domains.
  2. Click Add a domain and add primarydomain.com as a Secondary domain. Verify DNS.
  3. In Phase 3 of the Web Console, click Finalize User Rename.
  4. 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