Disable automatic IAM grants for default service accounts
Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.
Disable automatic IAM grants for default service accounts is a Google Cloud guardrail written in organization Policy Service. Stops the default App Engine and Compute Engine service accounts from being automatically granted the Editor role when they are created. No documented way to test it before enforcement was found on 10 Nov 2026.
More identity and privilege guardrails ยท About Organization Policy Service
constraints/iam.automaticIamGrantsForDefaultServiceAccounts
This boolean constraint, when enforced, prevents the default App Engine and Compute Engine service accounts that are created in your projects from being automatically granted any IAM role on the project when the accounts are created.
By default, these service accounts automatically receive the Editor role when they are created. To learn about default service accounts, see https://docs.cloud.google.com/iam/help/service-accounts/default.
To learn which roles to grant instead of the Editor role, see https://docs.cloud.google.com/iam/help/service-accounts/troubleshoot-roles-default.
This constraint is automatically provisioned as part of Google Cloud security baseline .
- Blocks
- Stops the default App Engine and Compute Engine service accounts from being automatically granted the Editor role when they are created. (legacy managed constraint, boolean.)
- Breaks
- Google documents that it does not stop the Editor or Owner role being granted to default service accounts later, and that other roles must be granted instead of Editor. (source)
- Test before applying
- As for every Organization Policy Service guardrail: how to test before enforcing
- Mechanism
- Organization Policy Service (managed and legacy constraints): Resources in the organization, folder or project where the policy is set and its descendants; Google says application of new policies is usually not retroactive.
- Taken from
- provider documentation, provider documentation
What the source says
"This boolean constraint, when enforced, prevents the default App Engine and Compute Engine service accounts that are created in your projects from being automatically granted any IAM role on the project when the accounts are created." (read 10 Nov 2026).
On what it breaks: "However, it doesn't prevent default service accounts from being granted the Editor or Owner roles later."
Related guardrails
- Prevent root credentials management in member accountsAWS, Service control policies (SCPs), identity and privilege
- Deny the root user except for S3 bucket policy changesAWS, Service control policies (SCPs), identity and privilege
- Deny critical IAM user actionsAWS, Service control policies (SCPs), identity and privilege
- Disable service account key creationGoogle Cloud, Organization Policy Service (managed and legacy constraints), identity and privilege
- Require OS LoginGoogle Cloud, Organization Policy Service (managed and legacy constraints), identity and privilege
- Deny service account key create and delete to a group on one projectGoogle Cloud, IAM deny policies, identity and privilege
Related pages
Sources
- Disable automatic IAM grants for default service accounts, read 10 Nov 2026
- What it breaks, read 10 Nov 2026
- How to test it first, read 10 Nov 2026
Last reviewed 16 Nov 2026.