Search code examples
firebasegoogle-cloud-platformfirebase-authenticationfirebase-adminprivate-key

Firebase Failed to generate a private key. Please try again in a few minutes error


I'm trying to generate a new key on firebase, but I got the error

Failed to generate a private key. Please try again in a few minutes.

by looking at the HTTP responses it gets a 400

enter image description here

so, I tried to give the right roles to the firebase service account it tells on the image above. Here is the final setting on IAM (further useless roles have been added for testing purposes, like the owner one):

enter image description here

after that, I got the same error. Any hint?


Solution

  • The error says Key creation is not allowed on this service account.

    There is an org policy to prevent key creation:

    Restricting service account usage

    You can disable the constraint via the web GUI or the CLI:

    gcloud resource-manager org-policies disable-enforce \
      iam.disableServiceAccountKeyCreation \
      --organization=<ORG_ID>