Connect Google Workspace
Let ProofLayer read your Google Workspace users and administrators to prove 2-Step Verification and tidy administrator access.
Before you start
Google Workspace is where your company’s email and accounts live. ProofLayer reads the list of users and administrators to show that 2-Step Verification is on. ProofLayer only reads. Nothing is changed.
Google does this with a service account: a robot identity. You allow that robot to look up users “on behalf of” one administrator, which Google calls domain-wide delegation. The robot proves who it is with a key file (a small text file you will download once).
| Word | What it means |
|---|---|
| Service account | A robot identity in Google Cloud. It is not a person and has no mailbox. |
| Key file (JSON) | The robot’s password, as a text file. Treat it like a password. |
| Domain-wide delegation | Your Super Admin telling Google “this robot may read users in my company”. |
| Customer ID | Your Google Workspace’s ID, such as C01abcd23. You can use your primary domain instead. |
Step 1: create the robot in Google Cloud
Open Google Cloud
Go to console.cloud.google.com and sign in with a Google account that can create projects. Pick an existing project or create one, for example “ProofLayer access”.
Turn on the Admin SDK API
Open APIs & Services → Library, search for Admin SDK API, open it and press Enable.
Create the service account
Open IAM & Admin → Service Accounts → Create service account. Name it
prooflayer-readonly. You do not need to give it any roles. Press Done.Note its client ID
Open the new service account. On the Details page find Unique ID (a long number). You will give this to Google Workspace in step 2.
Download a key
Open the Keys tab, press Add key → Create new key, choose JSON and press Create. A file downloads to your computer.
If Google refuses to create a key, your organisation may block key creation. Ask your Google Cloud administrator for an exception for this project.
Step 2: allow the robot to read users
Open the Admin console
Go to admin.google.com as a Super Admin. Open Security → Access and data control → API controls, then Manage domain-wide delegation.
Add the service account
Press Add new. Paste the Unique ID as the Client ID, and paste these two read-only scopes into OAuth scopes (separated by a comma):
OAuth scopes https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.customer.readonlyPress Authorize. Both scopes are read-only.
Choose who the robot acts as
Google needs the robot to act as a real administrator. A dedicated admin account such as
prooflayer-readonly@yourcompany.comis best. Write down its email address.Find your Customer ID
In the Admin console open Account → Account settings. Copy the Customer ID. Your primary domain also works.
Step 3: give ProofLayer the details
Create the connection
In ProofLayer go to Connections → New connection. For Provider choose Google Workspace and give it a Name.
Fill in the fields
Enter your Customer ID or primary domain, the administrator’s email in Administrator to act as, and the key file’s contents in Service account key (JSON).
Open the downloaded file in a text editor, select everything, copy, and paste it into the box. Then press Create. ProofLayer stores it encrypted and never shows it again.
Check that it works
Open the connection in ProofLayer
Go to Connections, click the connection you just made, and find the card called Google Workspace access.
Press Test access
ProofLayer makes one small read-only request and shows the answer.
Success looks like a green Access verified message. A red Access test failed message says what went wrong; see the table at the end of this page.
What ProofLayer reads
- Whether every active user has enrolled in 2-Step Verification.
- Whether every administrator has 2-Step Verification enforced, not just enrolled.
- Whether any active user has been idle for 90 days.
- How many super administrators you have (a few is healthy; the default limit is 4).
If something goes wrong
| What you see | Likely cause | What to do |
|---|---|---|
| Google says the client is “unauthorized” | Domain-wide delegation is missing, or the Client ID or scopes were typed wrongly. | Redo Manage domain-wide delegation and check both scopes and the Unique ID. |
| Not enough permissions | The “Administrator to act as” is not an administrator. | Use an account that holds an admin role. |
| Admin SDK API has not been used / is disabled | The API is not enabled in the project of the service account. | Enable Admin SDK API in that project. |
| Cannot create a key | Your organisation blocks service account keys. | Ask your Google Cloud administrator. |
| Key is not valid JSON | Only part of the file was pasted. | Open the file, select all, copy and paste again. |