Firebase · sdk · fg-0186

firebase-admin 12.2 calls fail asking for the serviceusage.serviceUsageConsumer role

If you see Caller does not have required permission to use project ... Grant the caller the roles/serviceusage.serviceUsageConsumer role, the cause and the fix for Firebase are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
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

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun