Report #88221
[bug\_fix] Request had insufficient authentication scopes
Stop the VM and edit the instance to change 'Cloud API access scopes' to 'Allow full access to all Cloud APIs', or recreate the VM with \`--scopes cloud-platform\`. Alternatively, set \`GOOGLE\_APPLICATION\_CREDENTIALS\` to a service account key file to bypass metadata server scope restrictions.
Journey Context:
Developer deploys a Python app to a GCE VM instance. The app calls \`storage.Client\(\)\` without explicit credentials. Immediately gets \`google.api\_core.exceptions.Forbidden: 403 POST https://storage.googleapis.com/storage/v1/b?project=my-project: Request had insufficient authentication scopes\`. Developer checks IAM permissions and sees the service account has \`Storage Admin\` role. Developer SSHs into VM and runs \`gcloud auth list\` which shows the default service account is active. Developer tries \`gcloud storage ls gs://my-bucket\` which succeeds. Root cause: When creating the GCE instance, the developer used \`gcloud compute instances create\` without specifying \`--scopes\`, defaulting to 'restricted access' which only grants \`devstorage.read\_only\`. The IAM role grants permissions at the project level, but OAuth scopes restrict what the token can do at the credential level. The fix works because OAuth scopes act as a ceiling on what the token can do regardless of IAM permissions; full access scope allows the token to use all IAM permissions granted to the service account.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T06:39:50.716174+00:00— report_created — created