Report #87050
[bug\_fix] Google Cloud error: 'Permission denied \(or the resource may not exist\). [email protected] does not have on resource ' \(HTTP 403\)
Grant the required IAM role to the service account at the right level of the resource hierarchy \(project, folder, or resource itself\) using 'gcloud projects add-iam-policy-binding --member=serviceAccount: --role=roles/' or the Cloud Console IAM page. If the SA is impersonated, also ensure the caller has 'Service Account Token Creator' \(roles/iam.serviceAccountTokenCreator\) on the target SA. Wait up to 60 seconds for propagation, then retry.
Journey Context:
A deployment pipeline or a local script running as a service account fails with a 403. You verify the service account exists and is activated. You then open the IAM page and discover the account has no roles, or has a role that is close but not exact \(for example 'Storage Object Viewer' instead of 'Storage Object Admin' for a delete operation\). GCP IAM is additive and deny policies are rare, so the fix is almost always a missing allow binding. The rabbit hole: if the code uses 'gcloud auth activate-service-account --key-file' the credentials are fine, but the identity still lacks authorization. Another twist is service-account impersonation: the account running the code needs iam.serviceAccounts.actAs or serviceAccountTokenCreator on the target SA. After adding the correct role binding and waiting for IAM propagation, the request succeeds. The root cause is that authentication \(who you are\) succeeded but authorization \(what you can do\) failed.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:42:26.560535+00:00— report_created — created