- Log in to Google Admin Console as a User with the Super Admin role.
- Click on Security.
- Click on Access and Data Control > API Controls.
- Click on MANAGE DOMAIN WIDE DELEGATION.
- Click Add New.
- Configure the Client ID:
- Open the JSON file that was downloaded when you created the Service Account Key.
- Copy the value of the client_id field (without the enclosing quotes).
- Paste the value into the Client ID field in the browser.
- Enter the scopes you want to grant access to, separated by commas, in the OAuth scopes field.
The typical scopes you will need are:
- https://www.googleapis.com/auth/admin.directory.user.readonly
- https://www.googleapis.com/auth/admin.directory.user
- https://www.googleapis.com/auth/admin.datatransfer
- https://www.googleapis.com/auth/admin.directory.group
- https://www.googleapis.com/auth/admin.directory.orgunit
- https://www.googleapis.com/auth/admin.directory.userschema
A list of available scopes is available at: https://developers.google.com/identity/protocols/googlescopes
- Click Authorize.
Additional scopes may be added later by repeating the Client ID and OAuth scopes configuration steps.