Search code examples
firebasegoogle-cloud-functionsservice-accountsgoogle-cloud-iamgoogle-cloud-identity

I can't deploy Firebase functions because I don't have "Service Account User" Role


I'm trying to deploy Firebase Functions like so:

firebase deploy --only functions

However, I'm getting the following error:

Error: Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account [email protected]. To address this error, ask a project Owner to assign your account the "Service Account User" role from this URL: https://console.cloud.google.com/iam-admin/iam?xyz

I've already given myself Service Account User permission by going to

Identity -> Service Accounts -> [email protected] -> Permissions -> + Grant Access

I've added my email and service account linked in GOOGLE_APPLICATION_CREDENTIALS. I'm still getting the same error.

Any ideas?


Solution

  • Can you verify that you are logged with the correct account and that you are linked to the project? You can double check by creating a new project and then in cli

    $ firebase logout
    $ firebase login
    $ firebase init