- Symptom
- Caller does not have required permission to use project ... Grant the caller the roles/serviceusage.serviceUsageConsumer roleAuth admin calls that worked on 12.1 fail after a minor upgradeFails only when running with Application Default Credentials of a service account
- Cause
- Releases after 12.1 sent the x-goog-user-project header for all Application Default Credentials, which requires the Service Usage Consumer role. Version 13 limited the header to human accounts.
- Fix
- Upgrade to firebase-admin 13 or later. On 12.x, grant roles/serviceusage.serviceUsageConsumer to the runtime service account.
- Apply
gcloud projects add-iam-policy-binding PROJECT_ID \ --member=serviceAccount:SA_EMAIL \ --role=roles/serviceusage.serviceUsageConsumer # or: npm install firebase-admin@^13- Affected
- firebase-admin 12.2.0 and later 12.x releases with service account Application Default Credentials; fixed in 13.0.0
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders