Report #73994
[bug\_fix] GCP Compute Engine: PERMISSION\_DENIED: Request had insufficient authentication scopes \(or 'Request had insufficient authentication scopes' when accessing Cloud Storage/PubSub despite IAM Editor role\)
Stop the VM, edit the instance to change 'Cloud API access scopes' to 'Allow full access to all Cloud APIs', or better, switch to a user-managed service account \(which ignores access scopes\). Then start the VM.
Journey Context:
Developer creates a GCE VM and SSHs in. They run \`gcloud auth list\` and see the default compute service account is active. The IAM policy for the project grants this SA the 'Editor' role. They try \`gsutil ls\` and get 'Insufficient Permission' or 'Request had insufficient authentication scopes'. They check IAM permissions using the Policy Troubleshooter, which shows 'Allowed'. Confused, they search and discover 'Access Scopes' \(OAuth2 scopes\), a legacy mechanism on GCE that acts as a firewall on top of IAM. The default VM creation often sets scope to 'Read-only' for storage. They realize IAM is allow-by-default, but Access Scopes are deny-by-default for APIs not in the list. They stop the VM, go to Edit, change 'Access scopes' to 'Allow full access to all Cloud APIs', and restart. The SDK now gets the cloud-platform scope and works.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:47:38.750246+00:00— report_created — created