TrustEvidence

Connect Google Workspace (read-only)

TrustEvidence reads your users' 2-Step Verification status, administrator flags and last sign-in times through the Admin SDK Directory API, using a service account with domain-wide delegation and one read-only scope.

https://www.googleapis.com/auth/admin.directory.user.readonly

1. Service account and key

In Cloud Shell, with a Google Cloud project you control selected:

PROJECT=$(gcloud config get-value project)
gcloud services enable admin.googleapis.com
gcloud iam service-accounts create trustevidence --display-name "TrustEvidence (read-only)"
gcloud iam service-accounts keys create trustevidence-key.json --iam-account trustevidence@$PROJECT.iam.gserviceaccount.com
gcloud iam service-accounts describe trustevidence@$PROJECT.iam.gserviceaccount.com --format 'value(oauth2ClientId)'

The service account needs no IAM roles in the project. The last command prints its client ID for step 2. Keep the key file safe until you have pasted it into TrustEvidence, then delete it (rm trustevidence-key.json).

If your organisation blocks service account key creation (the iam.disableServiceAccountKeyCreation policy), an organisation policy administrator has to allow it for this project.

2. Domain-wide delegation

In the Google Admin console: Security, Access and data control, API controls, Manage domain-wide delegation, Add new:

  • Client ID: the number printed in step 1.
  • OAuth scopes: https://www.googleapis.com/auth/admin.directory.user.readonly, and only this one.

3. Connect in TrustEvidence

On the Integrations page, under Connect Google Workspace, enter an administrator email to act as (a super administrator, or an administrator whose role can read users) and the contents of the key file. The connection is tested immediately.

Permission used

  • Google: admin.directory.user.readonly (domain-wide delegation)

What is read and what is never touched

What TrustEvidence reads

  • One users.list call with a field mask: id, email, name, administrator flags, 2-Step Verification enrolment and enforcement, creation time, last sign-in, suspension state and organisational unit

What it never touches

  • Gmail, Drive, Calendar, Chat or any other user content
  • Passwords and 2-Step Verification secrets
  • Groups, devices and other Admin console settings
  • Any write: the scope is read-only, and nothing is changed

Checks

CheckWhat it readsPasses when
2-Step Verification is enforced for all usersReads isEnforcedIn2Sv for every active user (reflects the 2SV enforcement setting of the user's organisational unit).Enforced for every active user.
All users are enrolled in 2-Step VerificationReads isEnrolledIn2Sv for every active user.Every active user enrolled.
No dormant active Google Workspace usersLists active users older than 90 days whose last sign-in is older than 90 days (or who never signed in).Every active user signed in within 90 days.
Super administrator count is limitedCounts active users with the super administrator role; more than four fails, fewer than two needs review.Two to four super administrators.
Super administrators use 2-Step VerificationReads isEnrolledIn2Sv for every active super administrator.Every super administrator enrolled.

5 checks. A check that cannot read what it needs reports insufficient evidence, never a pass.

Suspended and archived users are ignored. Password length and reuse settings are not available through this API, so they stay a manual control: record them with a screenshot of Security, Authentication, Password management as part of the access review.

Rotate or remove access

  • Rotate the key: create a new key with the keys create command above, reconnect the integration, then delete the old key under IAM & Admin, Service accounts, trustevidence, Keys.
  • Remove access: disconnect the integration in TrustEvidence (stored credentials are deleted at once), delete the domain-wide delegation entry, then delete the service account.

Verification status

The client and checks follow Google's documented Admin SDK and service-account sign-in flow, and are tested with a locally signed token against simulated Google endpoints. They have not yet been run against a live Workspace domain, so connect a test domain or organisational unit first and compare the results with the Admin console.