0
votes

I am switching my Firebase functions from one Firebase account to another. I have rerun firebase init. I have added the new service account configs to the project and am passing it to admin.initializeApp. I have logged into GCP via my CLI and have run firebase login:ci as well.

Despite all this, whenever I try to run firebase deploy, I am met with the error:

Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account @appspot.gserviceaccount.com.

Any idea what's going on here?

2

2 Answers

1
votes

This doesn't have anything to do with the service account you use to initialize the Firebase Admin SDK. The error has to do with the lack of permission of the Google Account that you used to sign in with the Firebase CLI. It doesn't have permission to deploy to Cloud Functions. You should either sign out then sign back in with an account that has permission (typically "editor" role), or add the appropriate permission to the account that you want to use.

0
votes

If you're migrating to a new Firebase project / account, you must delete the project's existing .firebaserc and firebase.json files before running firebase init - this will ensure that you're using the updated project configs.