Report #51565
[bug\_fix] Request had insufficient authentication scopes
Re-authenticate with the required OAuth scopes using 'gcloud auth application-default login --scopes=https://www.googleapis.com/auth/cloud-platform' \(or the specific API scope needed\), or switch to using a service account JSON key file which does not have the OAuth scope limitation when used with gRPC/REST clients.
Journey Context:
Developer runs code locally using Application Default Credentials \(ADC\) that were created via 'gcloud auth application-default login'. The code attempts to use the Google Cloud Storage API to write an object. The request returns a 403 with 'insufficient authentication scopes'. Developer verifies the IAM policy on the bucket shows the user has 'Storage Object Admin'. Developer regenerates ADC multiple times. Finally, developer realizes that 'gcloud auth application-default login' by default requests only the 'openid', 'email', and 'profile' scopes, not the cloud-platform scope. The IAM permission check happens \*after\* the OAuth scope check, so even with correct IAM, the request fails because the access token doesn't have the 'devstorage.read\_write' scope claim.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:02:45.199995+00:00— report_created — created