Identity (IDP) · Service account

Connect Google Workspace to Lutril

Lutril authenticates as a Google Cloud service account with domain-wide delegation, so it can read and manage your Workspace directory on behalf of a Workspace admin. You provide the service account JSON key and the admin email.

Required scope / permission

  • https://www.googleapis.com/auth/admin.directory.user
  • https://www.googleapis.com/auth/admin.directory.user.security
  • https://www.googleapis.com/auth/admin.directory.group.member
  • https://www.googleapis.com/auth/admin.directory.group.readonly
  • https://www.googleapis.com/auth/admin.reports.audit.readonly
  • https://www.googleapis.com/auth/admin.reports.usage.readonly
  • https://www.googleapis.com/auth/gmail.send

Setup steps

  1. In Google Cloud Console, open IAM and Admin, then Service Accounts, and click Create service account. Open Service Accounts
  2. Select the new service account, open Keys, click Add key, choose Create new key, and pick JSON. Paste the entire downloaded JSON file into Lutril.
  3. On the service account, open advanced settings and copy its Client ID (a numeric Unique ID used for delegation).
  4. In the Google Admin console, go to Security, then Access and data control, then API controls, and click Manage Domain Wide Delegation. Manage delegation
  5. Click Add new, paste the Client ID, enter the comma delimited list of OAuth scopes shown above, then click Authorize.
  6. Enter a Workspace admin email (a super admin authorized for these scopes) in Lutril so calls are made on that admin's behalf.