How the attack works
Domain-wide delegation lets a service account or OAuth client act as any user in a Google Workspace or Cloud Identity account, without that user's consent, for the OAuth scopes a super admin authorized. The grant is made in the Admin console under Security, Access and data control, API controls, and it names a client ID and a list of scopes. It is tied to the client, not to a key or a session.
An attacker who reaches a super admin account adds the client ID of a service account in a project they control, with scopes for mail, Drive or the directory. Resetting the admin's password and revoking sessions does not remove the grant. Google Workspace writes the change to its Admin audit log as AUTHORIZE_API_CLIENT_ACCESS. Organizations that share Workspace data with Google Cloud receive the same entry in Cloud Audit Logs at organization level, with service name admin.googleapis.com and method name google.admin.AdminService.authorizeApiClientAccess. The event parameters name the client and the scopes, and a second rule on this page raises the level when the scopes cover Gmail, Drive, the directory or Google Cloud.
What an attacker needs
- A super admin account; only super admins can manage domain-wide delegation.
- A service account or OAuth client under the attacker's control, in any Google Cloud project.
- No second approver; with multi-party approval turned on for domain-wide delegation, another super admin must approve the change.
Impact
Access to every user's data within the delegated scopes: mail, Drive, calendars and, with Admin SDK scopes, the directory itself. The actions are recorded as the impersonated users.
Detection rules
API Client Authorized for Domain-Wide Delegation in Google Workspace
Detects a Google Workspace super admin authorizing an API client for domain-wide delegation (Admin audit event AUTHORIZE_API_CLIENT_ACCESS). The entry reaches Cloud Audit Logs as an Admin Activity entry at organization level only when Google Workspace data sharing with Google Cloud is enabled, and reaches the SIEM only when the organization-level logs are routed to it. The client name and scopes are in protoPayload.metadata.
title: API Client Authorized for Domain-Wide Delegation in Google Workspace
id: bd4d7910-6a1e-4c23-b191-cf8269243b04
status: experimental
description: >-
Detects a Google Workspace super admin authorizing an API client for
domain-wide delegation (Admin audit event AUTHORIZE_API_CLIENT_ACCESS). The
entry reaches Cloud Audit Logs as an Admin
Activity entry at organization level only when Google Workspace data sharing
with Google Cloud is enabled, and reaches the SIEM only when the
organization-level logs are routed to it. The client name and scopes are in
protoPayload.metadata.
references:
- https://docs.cloud.google.com/logging/docs/audit/gsuite-audit-logging
- https://developers.google.com/workspace/admin/reports/v1/appendix/activity/admin-domain-settings
- https://knowledge.workspace.google.com/admin/apps/control-api-access-with-domain-wide-delegation
author: Forestall
date: 2026-11-11
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: gcp
service: gcp.audit
detection:
selection:
protoPayload.serviceName: admin.googleapis.com
protoPayload.methodName: google.admin.AdminService.authorizeApiClientAccess
condition: selection
falsepositives:
- Onboarding of migration, backup or security tools that need domain-wide delegation. These authorizations are rare and planned; verify each one against a change request.
level: high
False positives
- Onboarding of migration, backup or security tools that need domain-wide delegation. These authorizations are rare and planned; verify each one against a change request.
Domain-Wide Delegation Granted With Mail, Drive, Directory or Cloud Platform Scopes
Detects a Google Workspace super admin authorizing an API client for domain-wide delegation (Admin audit event AUTHORIZE_API_CLIENT_ACCESS) when the granted scopes include Gmail, Google Drive, the Admin SDK Directory API or the Google Cloud platform scope. With such a scope the client can read or change mail, files, users or cloud resources as any user of the account. The scopes are in the event parameter API_SCOPES, which Google documents only as "The API scopes" without a format. The rule therefore searches the serialized event list in protoPayload.metadata for the scope URLs as an admin enters them, and a scope that merely begins like a listed one, such as a narrower Drive scope, matches too. The general rule on this page fires on every delegation, whatever the scopes. The entry reaches Cloud Audit Logs as an Admin Activity entry at organization level, which is always written once Google Workspace data sharing with Google Cloud is enabled, and reaches the SIEM only when the organization-level logs are routed to it.
title: Domain-Wide Delegation Granted With Mail, Drive, Directory or Cloud Platform Scopes
id: 3e4cefb6-bd67-44ab-9631-fc190f81fed4
status: experimental
description: >-
Detects a Google Workspace super admin authorizing an API client for
domain-wide delegation (Admin audit event AUTHORIZE_API_CLIENT_ACCESS) when
the granted scopes include Gmail, Google Drive, the Admin SDK Directory API
or the Google Cloud platform scope. With such a scope the client can read
or change mail, files, users or cloud resources as any user of the account.
The scopes are in the event parameter API_SCOPES, which Google documents
only as "The API scopes" without a format. The rule therefore searches the
serialized event list in protoPayload.metadata for the scope URLs as an
admin enters them, and a scope that merely begins like a listed one, such
as a narrower Drive scope, matches too. The general rule on this page
fires on every delegation, whatever the scopes. The entry reaches Cloud
Audit Logs as an Admin Activity entry at organization level, which is
always written once Google Workspace data sharing with Google Cloud is
enabled, and reaches the SIEM only when the organization-level logs are
routed to it.
references:
- https://docs.cloud.google.com/logging/docs/audit/gsuite-audit-logging
- https://developers.google.com/workspace/admin/reports/v1/appendix/activity/admin-domain-settings
- https://knowledge.workspace.google.com/admin/apps/control-api-access-with-domain-wide-delegation
- https://developers.google.com/identity/protocols/oauth2/scopes
- https://knowledge.workspace.google.com/admin/apps/control-which-apps-access-google-workspace-data
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.003
logsource:
product: gcp
service: gcp.audit
detection:
selection:
protoPayload.serviceName: admin.googleapis.com
protoPayload.methodName: google.admin.AdminService.authorizeApiClientAccess
selection_scope:
protoPayload.metadata.event|contains:
- https://mail.google.com/
- https://www.googleapis.com/auth/gmail.
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/admin.directory.
- https://www.googleapis.com/auth/cloud-platform
condition: selection and selection_scope
falsepositives:
- Migration, backup, archiving and security tools that need mail or Drive access for every user. They are few and known by client ID. Verify each one against a change request, and exclude an approved client only together with the exact scopes that were approved.
level: critical
False positives
- Migration, backup, archiving and security tools that need mail or Drive access for every user. They are few and known by client ID. Verify each one against a change request, and exclude an approved client only together with the exact scopes that were approved.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
New key or signed token for a service account that holds domain-wide delegation
A delegation is tied to the client ID of a service account, not to one of its keys. Whoever can create a key for that account, or sign a token as it, can therefore use an existing delegation without any change in the Admin console. Credential events on exactly those accounts are the ones to watch.
- Keep a list of the service accounts that hold a delegation. The client IDs are in the domain-wide delegation list of the Admin console and in the event parameter
API_CLIENT_NAMEofgoogle.admin.AdminService.authorizeApiClientAccessentries. Resolve each one to the service account whoseoauth2ClientIdit is. - Alert on a
google.iam.admin.v1.CreateServiceAccountKeyentry fromiam.googleapis.comwhoserequest.namenames an account on the list. The entry is an Admin Activity entry and gives the caller inauthenticationInfo.principalEmail. - Where Data Access logs are enabled for the Service Account Credentials API, alert in the same way on
SignJwtandSignBlobentries fromiamcredentials.googleapis.comfor those accounts, when the caller is not the workload that owns the delegation.
Eventsgoogle.admin.AdminService.authorizeApiClientAccessgoogle.iam.admin.v1.CreateServiceAccountKeySignJwtSignBlob
LimitsDelegations made before the log retention began appear only in the Admin console list, so the list has to be seeded from there. Google documents the parameter only as the API client name, which is why each value has to be resolved to an account and not assumed. A client ID of an OAuth client that is not a service account cannot be matched to key events. Planned key rotation for a delegated account matches as well.
Triage
- Read the client name and scopes in protoPayload.metadata (event parameters API_CLIENT_NAME and API_SCOPES) and the caller in principalEmail.
- Find the service account that owns the client ID (its OAuth 2 client ID) and the project it lives in. A project outside the organization is a strong signal.
- Confirm the change with the application owner. Broad scopes such as full mail, Drive or Admin SDK access need a reason.
- Remove unexplained delegations in the Admin console and review sign-ins and admin actions of the super admin who made the change.
Response
Once the attack is confirmed:
- Delete the API client from the domain-wide delegation list in the Admin console. Google states that applications which depend on the authorization stop working immediately. If multi-party approval is on, the deletion needs approval from another super admin, so have one ready.
- Secure the super admin account that made the grant. Reset its password, end its sessions and review its 2-Step Verification methods. This alone would not have removed the delegation, because the grant is tied to the client and not to the admin's session.
- If the service account behind the client ID is in a project of your own organization, disable it and delete its keys. If it is in a project outside the organization you cannot act on it, and removing the delegation is the only control.
- Decide what data was within reach. The delegated scopes say which services the client could use as any user, such as mail, Drive, calendars or the directory, so treat the data of every user in those services as possibly accessed.
- Review the audit logs of those services for the period of the grant. The actions are recorded as the impersonated users, so look for access the users cannot explain, and for directory changes made with Admin SDK scopes.
- Review the remaining delegated clients for scopes that were added by the same admin.
Mitigation
- Keep super admins few, on separate accounts with security keys or passkeys.
- Turn on multi-party approval for domain-wide delegation, so that one compromised super admin cannot add or widen a delegation alone.
- Review the delegated client IDs and scopes regularly, and remove the ones nobody owns.
- Share Workspace audit logs with Google Cloud and route the organization-level logs to the SIEM, so that these changes reach the same place as Google Cloud audit logs.
Frequently asked questions
Does resetting the super admin's password remove the delegation?
No. The grant names a client ID and a list of scopes, and it is tied to that client, not to a key or a session of the admin who made it. Resetting the admin's password and revoking sessions leaves it in place. It has to be deleted in the Admin console under Security, Access and data control, API controls.
How does the use of a delegation appear in logs?
The service account acts as a user, and the actions are recorded as that user. Mail, Drive or directory activity through the delegation therefore looks like activity of the impersonated accounts. This makes the authorization event the best point to catch the attack, because later use blends in with normal user activity.
Why are a legitimate tool and an attacker's client hard to tell apart in the event?
Both produce the same `AUTHORIZE_API_CLIENT_ACCESS` event with a client name and scopes. What separates them is context, such as who owns the client ID, which project the service account lives in and whether a change request exists. A service account in a project outside the organization and broad scopes such as full mail, Drive or Admin SDK access are the strongest signals.
Who can grant domain-wide delegation, and can a second person be required?
Only super admins can manage domain-wide delegation. With multi-party approval turned on for it, another super admin has to approve the change, so one compromised super admin cannot add or widen a delegation alone.
References
- MITRE ATT&CK T1098.003: Additional Cloud Roles
- Control API access with domain-wide delegation
- Audit logs for Google Workspace (Cloud Audit Logs)
- Configure audit logs for Google Workspace
- Admin audit events: AUTHORIZE_API_CLIENT_ACCESS
- OAuth 2.0 Scopes for Google APIs
- Example logs for service accounts (creating a service account key)
- IAM API: service account resource (oauth2ClientId)
- Multi-party approval for sensitive actions