This setup is for both a source Google Workspace account and a Destination Google Workspace account.
Migrating from Google Vault
If you are migrating from Google Vault, billing must be enabled for the Google project being used for the migration. This is necessary to avoid very low Google Vault export quota limits.
Automated Process
This method uses a Powershell script to automate the majority of the process, making sure that the correct Scopes and APIs are applied, with only a few simple manual steps required.
It is easier and quicker than the full manual process, and less prone to error.
Before you start, you will need:
- An account in GCP with permissions to create a project (resourcemanager.projects.create role) or owner on existing project,
- The ability to run Powershell Script as Administrator,
- A browser window open and authenticated into the GCP tenant. This must be the last browser tab you have used.
To create a service account and obtain the private key for the account:
-
Install Google Cloud SDK using the instructions provided by Google here.
- This is mandatory. The Powershell script will not work if Google Cloud SDK is not installed.
- Ensure that the Google Cloud SDK is initialized by running the “gcloud init” command, and follow the instructions.
- Once Google Cloud SDK has finished installing, download the GCP_Configuration.ps1 file to your desktop,
- You can also copy the script into a Notepad++, saving it as GCP_Storage_Configuration and applying the Windows Powershell file type to it.
- Click on your Desktop Search icon (next to the Start Icon) and search for Windows Powershell, right click on it to display options and select Run as Administrator
-
On the GCP_Configuration.ps1 file, select Shift and right click. Select Copy as Path.
- This will copy the entire file path.
-
In the Windows Powershell window, enter CD and a space, paste the path into the Powershell script, then click the up button on your keyboard until you see the first half of the file path only (folder path) and select enter. It will look similar to: CD C:\Users\(your name)\Desktop
- If the (your name) value has a space in it anywhere, you will need to enclose the file path in quotation marks (") as Windows cannot parse the spaces. It should now look like: CD "C:\Users\(your name)\Desktop"
-
On the next line, type in .\GCP_Configuration.ps1 and press enter.
- If you see a security error that the Powershell Script is unsigned, run “Set-ExecutionPolicy Unrestricted”.
- On the Project ID line, enter a unique Project ID name.
- On the Service Account ID, enter a Service Account name. It can be the same as the Project ID name.
-
On the Scope line, enter one of the following to specify the scopes to be assigned:
- All (for Full scopes) - Recommended for Google to Google
- Standard
- SourceLimited
- DestinationLimited
- Vault
- Storage
- On the KeyType line, enter one of the following to specify the key type:
- P12
- JSON
- The Powershell script will run, setting up the service account and enabling the scopes. This may take a few minutes to complete.
- Once the Powershell has finished, you will need to manually complete a few easy steps (Steps 1 to 4 as detailed below) to complete the OAuth and Domain Wide Delegation configuration, with instructions and URLs displayed.
- For Step 1 - Configure OAuth Consent, copy the displayed URL and paste into a browser. Sign in to GCP with a full admin account.
- On the OAuth consent screen, set the User Type to Internal and select Create.
- On the next screen, set the App name to CloudM Migrate, and add a User Support email and a Developer Contact email address.
- Select Save and Continue.
- For Step 2 - Configure Google Workspace Domain Wide Delegation using the following ClientId and Scopes, copy the displayed URL in the Powershell window and paste into a browser.
- On the Security > API Controls > Domain-wide Delegation screen, select Add new to display the Add a new client ID pop-up box.
- Copy and paste the Client ID and OAuth Scopes from the Powershell window into the specified fields and select AUTHORIZE.
- Now, from the Step 3 - Service Account details for use in CloudM Migrate section of the Powershell script, copy the Service account email address that you need later when configuring the platform in CloudM Migrate.
- The P12 file that you will also need when configuring the platform in CloudM Migrate can be found in C:\CloudM\GCPConfig, along with a gcp_config log for the process.
Manual Process
To create a service account and obtain the private key for the account
- Open a web browser and sign in as an administrator for the required platform.
- Go to cloud.google.com/console
- Click the project selection menu in the blue navigation bar (1).
- Next to ‘Select from’ ensure the correct Organization you are creating the service account for is selected (2).
- Click ‘NEW PROJECT’ (3).
- Enter a project name.
- Ensure the correct organization is selected.
- The location can be left as the default or changed at your discretion.
- Click CREATE.
- Click on the “Menu” icon next to "Google Cloud Platform" in the top left of the page.
- Click 'APIs & Services', then 'Credentials'.
- Click CREATE CREDENTIALS, then select 'Service account'.
- Enter a service account name.
- Click ‘CREATE AND CONTINUE’.
- In the ‘Select a role’ menu, click ‘Project’, then select ‘Owner’. This step is optional.
- Click CONTINUE.
- The Grant users access to this service account section that is displayed next is optional, and can be left blank. Click DONE to continue.
- Click on OAuth consent screen.
- Under User Type, select ‘Make Internal’.
- Select EDIT APP. Enter an application name and enter a Support email and a Developer Contact Email.
- Click SAVE AND CONTINUE.
- Go back to Credentials and select the new Service account.
- Select the KEYS tab at the top of the screen, and click the ‘ADD KEY’ dropdown.
- Click ‘Create new key’.
- Select ‘P12’ or JSON (depending on which format you want to use), and then click ‘CREATE’ - This will download the required key file to be imported into CloudM Migrate.
- Close the ‘Private key password’ screen (1) as this is not needed.
- Navigate back to the APIs & Services > Credentials screen.
- In the list of Service accounts , open the account you have just created. Click the copy icon to take a note of the Unique ID. This Client ID will need to be added to Google Workspace later.
- Take a note of the Service Account Email. This will need to be added to CloudM Migrate later.
- Navigate to the APIs & Services > Dashboard page.
- Click ‘ENABLE APIS AND SERVICES’.
- In the ‘Search for APIs & Services’ search box, enter ‘Admin SDK’.
- Click on Admin SDK API
- Click ENABLE.
- The Admin SDK overview page is now shown. Click ‘APIs & Services’ to navigate back to the main APIs & Services page.
- Repeat steps 30-34 to enable each of the required APIs:
- Admin SDK API
- Google Drive API
- Gmail API
- Google Calendar API
- Google People API
- Google Tasks API
- Google Forms API
- Groups Migration API
- Google Vault API (if you are migrating from Google Vault).
- Cloud Storage (if you are Migrating from Google Storage).
- If migrating Google Drive, open the Google Workspace Admin console and navigate to Apps > Google Workspace > Drive and Docs > Features and Applications and enable 'Allow users to access Google Drive with the Drive SDK API': Drive SDK needs to be enabled for all migrating users.
- Open the Google Workspace admin console and navigate to Security > Access and data controls > API controls > Domain wide delegation.
- Click ‘Add new’ then enter the Client ID, the relevant OAuth scopes listed next, and then click ‘AUTHORIZE’.
If 'Use Limited Scopes' is going to be set as 'False' (default) in the Migration Settings section for the platform in CloudM Migrate, use the full scopes listed here:
- https://www.googleapis.com/auth/admin.directory.resource.calendar,
- https://www.googleapis.com/auth/gmail.settings.sharing,
- https://mail.google.com/,
- https://sites.google.com/feeds/,
- https://www.googleapis.com/auth/admin.directory.group,
- https://www.googleapis.com/auth/admin.directory.user,
- https://www.googleapis.com/auth/apps.groups.migration,
- https://www.googleapis.com/auth/calendar,
- https://www.googleapis.com/auth/drive,
- https://www.googleapis.com/auth/drive.appdata,
- https://www.googleapis.com/auth/email.migration,
- https://www.googleapis.com/auth/tasks,
- https://www.googleapis.com/auth/forms,
- https://www.googleapis.com/auth/gmail.settings.basic,
- https://www.googleapis.com/auth/contacts,
- https://www.googleapis.com/auth/contacts.other.readonly,
- https://www.googleapis.com/auth/contacts.readonly,
- https://www.googleapis.com/auth/directory.readonly,
- https://www.googleapis.com/auth/user.addresses.read,
- https://www.googleapis.com/auth/user.birthday.read,
- https://www.googleapis.com/auth/user.emails.read,
- https://www.googleapis.com/auth/user.gender.read,
- https://www.googleapis.com/auth/user.organization.read,
- https://www.googleapis.com/auth/user.phonenumbers.read,
- https://www.googleapis.com/auth/userinfo.email,
- https://www.googleapis.com/auth/userinfo.profile
If 'Source Platform Migration Settings > Google Workspace > Email Options > Use Limited Scopes' is set to 'True', use the following scopes:
- https://www.googleapis.com/auth/gmail.labels,
- https://www.googleapis.com/auth/gmail.readonly,
- https://www.googleapis.com/auth/admin.directory.resource.calendar,
- https://www.googleapis.com/auth/gmail.settings.sharing,
- https://sites.google.com/feeds/,
- https://www.googleapis.com/auth/admin.directory.group,
- https://www.googleapis.com/auth/admin.directory.user,
- https://www.googleapis.com/auth/apps.groups.migration,
- https://www.googleapis.com/auth/calendar,
- https://www.googleapis.com/auth/drive,
- https://www.googleapis.com/auth/drive.appdata,
- https://www.googleapis.com/auth/email.migration,
- https://www.googleapis.com/auth/tasks,
- https://www.googleapis.com/auth/forms,
- https://www.googleapis.com/auth/gmail.settings.basic,
- https://www.googleapis.com/auth/contacts,
- https://www.googleapis.com/auth/contacts.other.readonly,
- https://www.googleapis.com/auth/contacts.readonly,
- https://www.googleapis.com/auth/directory.readonly,
- https://www.googleapis.com/auth/user.addresses.read,
- https://www.googleapis.com/auth/user.birthday.read,
- https://www.googleapis.com/auth/user.emails.read,
- https://www.googleapis.com/auth/user.gender.read,
- https://www.googleapis.com/auth/user.organization.read,
- https://www.googleapis.com/auth/user.phonenumbers.read,
- https://www.googleapis.com/auth/userinfo.email,
- https://www.googleapis.com/auth/userinfo.profile
If 'Destination Platform Migration Settings > Google Workspace > Email Options > Use Limited Scopes' is set to 'True', use the following scopes:
- https://www.googleapis.com/auth/gmail.labels,
- https://www.googleapis.com/auth/gmail.insert,
- https://www.googleapis.com/auth/admin.directory.resource.calendar,
- https://www.googleapis.com/auth/gmail.settings.sharing,
- https://sites.google.com/feeds/,
- https://www.googleapis.com/auth/admin.directory.group,
- https://www.googleapis.com/auth/admin.directory.user,
- https://www.googleapis.com/auth/apps.groups.migration,
- https://www.googleapis.com/auth/calendar,
- https://www.googleapis.com/auth/drive,
- https://www.googleapis.com/auth/drive.appdata,
- https://www.googleapis.com/auth/email.migration,
- https://www.googleapis.com/auth/tasks,
- https://www.googleapis.com/auth/forms,
- https://www.googleapis.com/auth/gmail.settings.basic,
- https://www.googleapis.com/auth/contacts,
- https://www.googleapis.com/auth/contacts.other.readonly,
- https://www.googleapis.com/auth/contacts.readonly,
- https://www.googleapis.com/auth/directory.readonly,
- https://www.googleapis.com/auth/user.addresses.read,
- https://www.googleapis.com/auth/user.birthday.read,
- https://www.googleapis.com/auth/user.emails.read,
- https://www.googleapis.com/auth/user.gender.read,
- https://www.googleapis.com/auth/user.organization.read,
- https://www.googleapis.com/auth/user.phonenumbers.read,
- https://www.googleapis.com/auth/userinfo.email,
- https://www.googleapis.com/auth/userinfo.profile
Migrating from Google Vault?
If you are migrating from Google Vault, use these API Scopes:
- https://www.googleapis.com/auth/admin.directory.resource.calendar,
- https://www.googleapis.com/auth/gmail.settings.sharing,
- https://mail.google.com/,
- https://sites.google.com/feeds/,
- https://www.googleapis.com/auth/admin.directory.group,
- https://www.googleapis.com/auth/admin.directory.user,
- https://www.googleapis.com/auth/apps.groups.migration,
- https://www.googleapis.com/auth/calendar,
- https://www.googleapis.com/auth/drive,
- https://www.googleapis.com/auth/drive.appdata,
- https://www.googleapis.com/auth/email.migration,
- https://www.googleapis.com/auth/tasks,
- https://www.googleapis.com/auth/forms,
- https://www.googleapis.com/auth/gmail.settings.basic,
- https://www.googleapis.com/auth/ediscovery,
- https://www.googleapis.com/auth/ediscovery.readonly,
- https://www.googleapis.com/auth/devstorage.read_write,
- https://www.googleapis.com/auth/contacts,
- https://www.googleapis.com/auth/contacts.other.readonly,
- https://www.googleapis.com/auth/contacts.readonly,
- https://www.googleapis.com/auth/directory.readonly,
- https://www.googleapis.com/auth/user.addresses.read,
- https://www.googleapis.com/auth/user.birthday.read,
- https://www.googleapis.com/auth/user.emails.read,
- https://www.googleapis.com/auth/user.gender.read,
- https://www.googleapis.com/auth/user.organization.read,
- https://www.googleapis.com/auth/user.phonenumbers.read,
- https://www.googleapis.com/auth/userinfo.email,
- https://www.googleapis.com/auth/userinfo.profile
Service Account and Scopes Propagation Time
Similarly with the Service account and APIs, adding the Client and Scopes in the Google Workspace console may be subject to a propagation time of up to two hours.