Identity & security
Google Workspace
Connect your Workspace directory so Dave can answer who someone is, and change accounts only after you approve it.
Connect Dave with one dedicated Workspace user (not a Google Cloud service account). Its admin role is the ceiling on everything Dave can do. Reads use a read-only token; a token that can make changes is minted only for a command a human has approved.
Avoid a licence charge
Section titled “Avoid a licence charge”The account needs no Gmail or Drive, so it can be on Cloud Identity Free. By default the Admin console puts new users on your paid plan, so set this up before creating it:
-
Billing → Buy or upgrade → add Cloud Identity Free.
-
Directory → Organisational units → add a child unit, e.g.
Service accounts. -
Billing → Licence settings → select that unit, turn automatic licensing off for your paid plan and on for Cloud Identity Free.
Alternatively, create the user normally and switch its licence afterwards under Directory → Users → the user → Licences. If Cloud Identity Free isn’t offered on your subscription, a licensed user works the same.
Create the account
Section titled “Create the account”-
Directory → Users → Add new user, inside the unit above, e.g.
dave-automation. Turn off Ask for a password change at the next sign-in. -
Account → Admin roles → Create new role. Under Admin API privileges (not Admin console privileges), grant the privileges listed under Permissions. Save, then reopen the role to check the privileges stuck.
-
Assign the role to the account. Scope it to the whole organisation, not the service accounts unit.
Connect
Section titled “Connect”-
In Dave, go to Integrations → Add integration → Google Workspace.
-
Set a Label, e.g.
acme. -
Choose Connect Google Workspace and sign in as the account.
-
On Google’s consent screen, allow every permission listed. Dave refuses the connection if any read permission is left unticked.
Permissions
Section titled “Permissions”You need a Workspace super admin to create the account and the custom role. The connection itself runs as the dedicated account, with only that role.
The custom role’s Admin API privileges, which you assign by hand:
Users → ReadGroups → ReadOrganisational Units → ReadTo let Dave make approved changes, also grant:
Users → UpdateGroups → UpdateLeave Delete off.
Dave always requests these OAuth scopes. The read scopes are required:
https://www.googleapis.com/auth/admin.directory.user.readonlyhttps://www.googleapis.com/auth/admin.directory.group.readonlyhttps://www.googleapis.com/auth/admin.directory.group.member.readonlyhttps://www.googleapis.com/auth/admin.directory.orgunit.readonlyThe change scopes are requested as well, and are only used for an approved command:
https://www.googleapis.com/auth/admin.directory.userhttps://www.googleapis.com/auth/admin.directory.grouphttps://www.googleapis.com/auth/admin.directory.group.memberPlus openid and email, so Dave can record which account connected.
The scopes are the same for every customer. Whether a change succeeds depends on the role: without the Update privileges, Google refuses every change.
Manage the connection
Section titled “Manage the connection”Review or remove Dave’s access in the Admin console:
- Security → Access and data control → API controls → Manage Third-Party App Access lists Dave’s OAuth app. Block it there to cut it off for the whole domain.
- Account → Admin roles → your Dave role, to change what Dave can read or change.
- Signed in as the Dave account, Google Account → Security → Your connections to third-party apps & services → Dave → Delete all connections, to revoke the grant itself.
Disconnect in Dave stops Dave using the connection, but does not revoke the grant at Google. To revoke it, delete the connection on the Dave account as above, or suspend the account. To stop changes but keep reads, remove the Update privileges from the role.
Approved changes
Section titled “Approved changes”Dave makes changes with GAM. It looks up the account, writes the command, and runs it only after you approve it:
gam update user ada@acme.com suspended onWhat is bounded regardless of the command:
- The role. Without Users → Delete, Google refuses any deletion.
- The credential. Minted for one approved command, deleted when it finishes, expires within the hour, and cannot be used to obtain another.
Troubleshooting
Section titled “Troubleshooting”When the connection fails, the row shows one of these reasons:
| Reason | Meaning |
|---|---|
missing_directory_scopes |
A read permission was unticked on Google’s consent screen. Connect again and allow everything. |
workspace_directory_unreadable |
Dave could not read the directory as that account. The role is missing a Read privilege, or isn’t assigned to the whole organisation. |
missing_refresh_token |
Google did not return a long-lived token. Connect again. |
If the sign-in fails with an administrator policy error, your domain restricts third-party apps. Go to Security → Access and data control → API controls → Manage Third-Party App Access and trust the OAuth client ID your Dave contact gives you.