Authorize the service account

Next, authorize the service account in your Google Admin console. 

  1. In your Admin console, click Securityand thenAdvanced settings. You might need to click Show more to see Advanced settings. 
  2. In the Authentication section, click Manage API client access
  3. In the Client Name field, enter your service account client ID.

    You can find the client ID in the JSON file you downloaded when you created the G Suite service account. Alternatively, open Google Cloud Platform (GCP) Console and click IAM & Adminand thenService accounts. Click the service account email address. The client ID is shown in the Unique ID field.

  4. In the One or More API Scopes box, copy and paste the following comma-separated list of scopes:

    https://apps-apis.google.com/a/feeds/emailsettings/2.0/,
    https://www.googleapis.com/auth/contacts,
    https://www.googleapis.com/auth/admin.directory.group,
    https://www.googleapis.com/auth/admin.directory.group.member,
    https://www.googleapis.com/auth/admin.directory.orgunit,
    https://www.googleapis.com/auth/admin.directory.resource.calendar,
    https://www.googleapis.com/auth/admin.directory.user,
    https://www.googleapis.com/auth/apps.groups.migration,
    https://www.googleapis.com/auth/apps.groups.settings,
    https://www.googleapis.com/auth/calendar,
    https://www.googleapis.com/auth/drive,
    https://www.googleapis.com/auth/drive.appdata,
    https://www.googleapis.com/auth/drive.file,
    https://www.googleapis.com/auth/gmail.modify,
    https://www.googleapis.com/auth/migrate.deployment.interop,
    https://www.googleapis.com/auth/tasks,
    https://www.googleapis.com/auth/userinfo.email,
    https://sites.google.com/feeds,
    https://www.googleapis.com/auth/gmail.settings.basic,
    https://www.googleapis.com/auth/gmail.settings.sharing,
    https://www.googleapis.com/auth/admin.directory.customer.readonly,
    https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly

  5. Click Authorize.

Note: It might take some time for the authorization process to complete.

Next step

Create a Google service account connection