Report #92911
[bug\_fix] Unable to find quota project
Run \`gcloud auth application-default set-quota-project PROJECT\_ID\` to associate your Application Default Credentials with a billing/quota project, or set the \`GOOGLE\_CLOUD\_QUOTA\_PROJECT\` environment variable to the project ID. When using Application Default Credentials \(ADC\) obtained via \`gcloud auth application-default login\` \(user credentials\), the client libraries require an explicit quota project because user credentials span multiple projects. This project is used for billing and quota tracking for the API calls, distinct from the project containing the target resource.
Journey Context:
A developer creates a new Python script to list Cloud Storage buckets using \`google-cloud-storage\`. They authenticate locally using \`gcloud auth application-default login\` and select their user account. When they run the script, it fails with 'Unable to find quota project'. They check \`gcloud config get-value project\` and it returns 'my-project-123'. They check the Cloud Console and confirm 'my-project-123' exists and has the Cloud Storage API enabled. They try setting \`export GOOGLE\_APPLICATION\_CREDENTIALS=~/.config/gcloud/application\_default\_credentials.json\` but the error persists. They search the error and find that ADC for user credentials requires explicitly setting a quota project because a user can belong to many projects, unlike a service account which is tied to one project. They run \`gcloud auth application-default set-quota-project my-project-123\` and the script works. The quota project tells GCP which project to count the API call against for quota limits and billing, even though the buckets might reside in a different project.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:32:21.919039+00:00— report_created — created