Google Workspace scan
Audits a Google Workspace (formerly G Suite) domain for security weaknesses. Built on Google's Admin SDK.
What it checks
- Users β 2SV (2-step verification) disabled, recovery phone/email missing, suspended accounts with active OAuth grants.
- Groups β public posting, external member density, owner sprawl.
- OAuth apps β third-party apps with sensitive scopes (
gmail.send,drive.readonly, etc.), and which users granted them. - DLP policies β missing or empty DLP rules on Gmail and Drive.
- Retention policies β hold gaps, missing retention on high-risk labels.
- Admin roles β super-admin density, role-activation audit gaps.
- Security baseline β password strength enforcement, login challenge rules, MFA drift vs. baseline.
Credentials
Requires a service account with domain-wide delegation and read-only scopes:
https://www.googleapis.com/auth/admin.directory.user.readonly
https://www.googleapis.com/auth/admin.directory.group.readonly
https://www.googleapis.com/auth/admin.reports.audit.readonly
https://www.googleapis.com/auth/admin.reports.usage.readonly
https://www.googleapis.com/auth/apps.alerts
Pentestas never requires write scopes β the scan is pure audit.
Setting up the service account
- Go to Google Cloud Console β IAM & Admin β Service Accounts.
- Create a service account. Skip role grants at the cloud level.
- Generate a JSON key; download it.
- Enable Domain-Wide Delegation on the service account; copy the Client ID.
- Admin Console β Security β API Controls β Domain-wide delegation β add a new client with the scopes above.
- Upload the JSON key to Pentestas (Settings β Integrations β Google Workspace). We'll pair it with the admin email used for impersonation.
Output
Findings highlight misconfigured users + groups + apps. Each includes a deep link to the matching Admin Console page so you can remediate in one click.
Pitfalls
- Too many OAuth grants β this scan typically uncovers dozens. Prioritise apps with
drive.readonlyor broader. - Unverified apps β Google's "unverified" label isn't the same as "malicious", but it is a triage cue.
- Legacy IMAP / SMTP β modern Workspace defaults to OAuth, but many tenants have leftover legacy protocol allow lists. Pentestas surfaces them.
See also
- Azure subscription scan β similar model for AAD / Entra.