If you're using 3-legged OAuth as your Google authentication method, you can skip this step and go to Download & install.
To use a service account as your authentication method, you need to create an account and set it up before you install Password Sync. How you create the account depends on whether you want to run an automated script (recommended) or manually create a service account.
You're on step 3 of 7
Option 1: Use an automated script to create the account
This GitHub script is not supported by Google Workspace support. If you have issues using the script, follow the steps to manually create the account instead. Learn more about using the script.
- Sign in as a super administrator and, in a browser window, open Cloud Shell.
- In the editor, enter python3 <(curl -s -S -L https://git.io/password-sync-create-service-account).
- Complete the steps in the Cloud Shell window.
- Click Download to download the JSON file that contains the service account's client ID to your computer.
- Go to Download & install.
Learn more about using the script.
Option 2: Manually create a service account
Step 1: Create a project
- Go to Google Cloud and sign in as a super administrator. If it's your first time signing in to the console, agree to the Terms of Service.
- Click IAM & Admin
Manage Resources. You might have to click Menu
first.
- At the top, click Create Project and enter a project name.
- (Optional) To add the project to a folder, for Location, click Browse, navigate to the folder, and click Select.
- Click Create.
- By default, only the creator of the project has rights to manage the project. To ensure the project can be maintained if the creator leaves the organization, you should assign at least one other person the role of Project Owner. For details, go to Manage access to projects, folders, and organizations.
Step 2: Turn on the APIs for the service account
Step 3: Set up the OAuth consent screen
Tip: When adding the email addresses below, use shared administrator email accounts.
- In Google Cloud, open the project that you created earlier.
- If you manually created a service account, the project was created in Step 1: Create a project.
- If you created the project using a script, the project name is listed in the Google Cloud Shell Editor after the script runs.
- Click APIs & Services
OAuth consent screen. You might have to click Menu
first.
- Click Branding
If you don't see Get started, go to step 4. Otherwise, go to step 5.
- Click Clients.
If you see + Create client, go to Step 4: Create the service account. Otherwise, go to step 5.
- Click Get started.
- For App name, enter your application's name (for example, Google Workspace Migrate or GWM).
- For User support email, enter an email that users can contact with questions, and then click Next.
- For Audience, select Internal, and then click Next.
- For Contact Information, enter any relevant email addresses, and then click Next.
- For Finish, check the I agree to the Google API Services: User Data Policy box.
- Click Continue
Create.
Step 4: Create the service account
- Click APIs & Services
Credentials. You might have to click Menu
first.
- Click Create Credentials
Service account.
- For Service account name, enter a name for the service account and optionally add a description.
- Click Create and Continue
Done.
- Make a note of the Unique ID value for the service account. You'll need it later. This value is also the service account's client ID.
Tip: You can also find the value on the Details tab of the service account or in the JSON file.
- Click Done
Save.
- At the top, click Keys
Add Key
Create new key.
- Make sure the key type is set to JSON and click Create.
You'll get a message that the service account's private key JSON file was downloaded to your computer.
- Make a note of the file name and where your browser saves it. You'll need it later.
- Click Close.
Step 5: Authorize your client ID in the Admin console
-
In the Google Admin console, go to Menu
Security
Access and data control
API controls
Manage Domain Wide Delegation.
You must be signed in as a super administrator for this task.
-
Click Add new and enter your service account client ID.
You can find the ID (also known as the Unique ID) in the JSON file that you downloaded when you created the service account or in Google Cloud (click IAM & Admin
Service accounts
the name of your service account).
- For
OAuth scopes, enter the following scope:
https://www.googleapis.com/auth/admin.directory.user
- Click Authorize.
Google, Google Workspace, and related marks and logos are trademarks of Google LLC. All other company and product names are trademarks of the companies with which they are associated.