0
votes

I have two apple developer accounts. A business one, and a personal one.

I have previously deployed functions from my business account, yet now, when I try and deploy from my personal account I being told that the business account does not have permissions to access the project - obviously, as it's from a seperate account.

Waiting for authentication...

✔ Success! Logged in as {Personal account}

Ste@Stephens-MacBook-Pro {Personal project} % firebase deploy --only functions

Error: Missing permissions required for functions deploy. You must have permission iam.serviceAccounts.ActAs on service account {Business project}@appspot.gserviceaccount.com.

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?project={Business project}

I've used the following several times to logout and login to the new account.

Ste@Stephens-MacBook-Pro {Personal project} % firebase logout ✔

Logged out from {Business account} Ste@Stephens-MacBook-Pro

{Personal project} % firebase login

I've even removed Firebase CLI and reinstalled it but I still get the same error. I must be missing something but I can't work out where the link to the business account is being held.

2

2 Answers

1
votes

Not sure I quite follow the question but here is my take: If it's the same project that you are accessing using your personal and business accounts, then you would have to have the rights to deploy (as per the error message). If you have separate personal and business projects, then you would have to logout, change local project folders, login and then run the deploy commands. Essentially, make sure that you are in the right project folder with the right user id when you run the deploy command or ensure that the user id that's trying to deploy has the rights to deploy for that specific project.

0
votes

In order to deploy to the correct project you must not only be logged in as the correct user, but also then select that user’s project.

firebase use \***{Project ID}***

I’d wrongly assumed that logging out of one account, and back in would mean I’d deploy to the different project, however, it would appear that you have to specifically change the project as well as changing account.