Firebase · sdk · fg-0186

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

Caller does not have required permission to use project ... Grant the caller the roles/serviceusage.serviceUsageConsumer role

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

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

Affects: firebase-admin 12.2.0 and later 12.x releases with service account Application Default Credentials; fixed in 13.0.0

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp