
Configuration
- Go to Inventory and select + App to add the Google Workspace App.

- For Opal to manage your Google Workspace on your behalf, you’ll need to create a Google service account with proper permission scopes to retrieve role and user information. Grant the service account the following scopes:
admin.directory.user scope is used to import and manage users, and the admin.directory.rolemanagement scope is used to import and manage roles.
If you only want to view user’s access and not grant/revoke their access, you can use the admin.directory.user.readonly and admin.directory.rolemanagement.readonly scopes instead.
- Enable the Admin SDK API in the project that the service account was created in.
In Google, role assignment
privileges
are only available to super administrator role. Opal needs the Google
Workspace admin email to be a super administrator in order to import admin
roles.
-
Return to Opal to finish the app creation form.
- Google Workspace admin email: Enter the email of a user who has the Super Admin role. Opal needs this so the service account can read role assignments. To find your super admins, go to the Admin console > Account > Admin roles > Super Admin. This is a person’s email, not the service account email.
- Google Workspace customer ID: Enter your Workspace customer ID. See Google’s instructions for finding it.
- Choose how Opal authenticates as the service account:
- Workload identity federation (recommended)
- Service account key
Workload identity federation is in limited beta. Contact Opal support to enable it for your organization.
- In the service account’s project, enable the Security Token Service API and the IAM Service Account Credentials API.
- On the Opal app form, turn on Authenticate with workload identity federation instead of a service account key. Opal shows an Issuer, Subject, Audience, and JWKS. Keep the form open until you select Create: reloading it generates a new key, which changes the subject and JWKS.
-
In Google Cloud, create a workload identity pool, or reuse one, and add an OIDC provider to it:
- Issuer: the Issuer from Opal.
- JWKS: paste the JWKS from Opal (for example with
--jwk-json-pathin gcloud). - Attribute mapping:
google.subject=assertion.sub. - Attribute condition:
assertion.sub == '<Subject from Opal>'. - Leave the provider’s allowed audiences empty. Opal uses the provider’s default audience.
constraints/iam.workloadIdentityPoolProvidersorganization policy), allowhttps://app.opal.dev, or your own Opal URL for self-hosted Opal. -
Grant roles on the service account to the principal for the subject, using the project’s number, not its ID:
principal://iam.googleapis.com/projects/PROJECT_NUMBER/locations/global/workloadIdentityPools/POOL/subject/<Subject from Opal>roles/iam.workloadIdentityUser, for every Google app.roles/iam.serviceAccountTokenCreator, for Google Groups, Google Shared Drive, and Google Workspace only. Domain-wide delegation needs it because Google signs the delegation token when there’s no key.
-
Back on the Opal form, enter the Workload identity provider (its full resource name, for example
projects/123456789/locations/global/workloadIdentityPools/opal/providers/opal), the Service account email, and the Service account project ID, then select Create.
Run app validation checks
After you save your app, you can view existing sync issues from the Setup tab on the app detail page. Missing permissions and sync issues show in the App Validations section. Select the refresh icon to rerun validation checks.