Skip to content

Session Revocation — Google Workspace

Session Revocation — Google Workspace

Challenge signs out Google Workspace users using the Admin SDK Directory API.

Credentials

Challenge stores a Google Admin SDK access token (Bearer). Typical setup:

  1. Create a Google Cloud project and enable the Admin SDK API.
  2. Create a service account and enable domain-wide delegation.
  3. In Google Workspace Admin, authorize the service account client ID with the scopes below.
  4. Use the service account to mint an access token for a super-admin or dedicated admin user impersonation target, then paste the token into Challenge (or automate refresh outside Challenge).

Configure under Integrations → Session Revocation → Google Workspace.

API calls Challenge makes

StepMethodEndpoint
LookupGEThttps://admin.googleapis.com/admin/directory/v1/users/{userKey}
RevokePOSThttps://admin.googleapis.com/admin/directory/v1/users/{userKey}/signOut

Least-privilege guidance

Authorize only:

OAuth scopePurpose
https://www.googleapis.com/auth/admin.directory.user.readonlyUser lookup
https://www.googleapis.com/auth/admin.directory.user.securitysignOut for a user

See Directory API: users.signOut. Use a dedicated admin role in Workspace that can manage user security settings, not full super-admin, when your policy allows.

Username format

Use the user’s primary email address.

Troubleshooting

SymptomCheck
user_not_foundEmail does not match Workspace directory
http_403Domain-wide delegation scopes or admin role insufficient