Enabling IAM before the roles and grants exist locks out every user and service account without a grant. Every principal that must keep working needs a grant before the switch is turned.
The Switch
GET /v2/iam/settings returns the organization’s IAM settings. An organization starts disabled.
GET /v2/iam/settings
PATCH /v2/iam/settings enables IAM.
PATCH /v2/iam/settings
What Changes
Enabling IAM is what makes roles decide. While it is off, grants exist but change nothing.Before Enabling
The order that leaves no gap is short.- Write the roles.
- Grant one to each user and service account, and check the list with
GET /v2/iam/grants. - Enable IAM.
Disabling
{"enabled": false} returns every principal to its existing permissions within five seconds. Roles and grants stay as they are, so IAM can be enabled again without rewriting anything.