Skip to main content
selectGooglelast verified 2026-07-31
Servicesiam
CredentialsGOOGLE_CREDENTIALS
Permissionsiam.serviceAccounts.list
Fan-out: project - one call per project when swept org-wide. One list call per project when swept org-wide

GCP service accounts in a project

Lists the IAM service accounts in a single project. Service accounts are the workload principals in GCP, so this enumeration is the starting point for key hygiene and privilege audits - every one of these emails can appear in IAM bindings across the organisation.

Query

SELECT email, displayName, uniqueId, disabled
FROM google.iam.service_accounts
WHERE projectsId = '{{project}}';

Notes

The parameter is projectsId, not project - the IAM API uses the projectsId form while Cloud Storage and Compute take project, so the naming differs between Google services and a wrong choice fails with a could not locate symbol error. disabled comes back null rather than false for accounts that have never been disabled, so test for the string true rather than treating null as enabled being unset. Every project carries Google-managed default accounts - the App Engine and Compute Engine defaults appear in this list alongside user-created ones - and those defaults are often over-privileged with project Editor, which makes them worth flagging in an audit even though nobody created them deliberately. uniqueId is stable across a delete and recreate of the same email, so it is the safer join key when correlating with audit logs. For key hygiene, follow up per account with google.iam.service_accounts_keys filtered on the account email to find user-managed keys and their ages.

Related queries

  • GCP projects under an org or folder - Lists projects directly under a parent organization or folder with state, display name and labels; the fan-out dimension for any org-wide GCP audit.
  • GCS buckets in a project - Lists Cloud Storage buckets in one project with location, storage class and creation time; the per-project storage inventory.