Firebase Functions 2nd Gen: The request was not authorized to invoke this service. #12305
Unanswered
madhavgharmalkar
asked this question in
Q&A
Replies: 1 comment
-
@madhavgharmalkar 👋🏽 I came here trying to find a solution myself. I was getting the same error when deploying 2nd gen Cloud function (written in Python). I managed to resolve it by updating the IAM policy. I had to update the members from service account to allUsers (since I built a public API) and assigning the roles/run.invoker. Verify the policy using: `gcloud run services get-iam-policy projects//locations//services/
Try assigning this role to the user/service account according to your function requirements. I hope that helps 🙌🏽 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! 👋🏾
I'm running into an issue using Swift, and 2nd Gen firebase functions (Node / Typescript). I've successfully tested my functions using the local emulator, and have successfully deployed them to firebase. However when I try to invoke the function, I run into the following error:
The request was not authorized to invoke this service. Read more at https://cloud.google.com/run/docs/securing/authenticating Additional troubleshooting documentation can be found at: https://cloud.google.com/run/docs/troubleshooting#401
After doing some searching on google, I found this StackOverflow issue which recommends adding the
Cloud Functions Invoker
permission to the service account. I tried that and it didn't work. Just to make sure, I added theCloud Functions Invoker
role to every account in my GCP IAM and I still haven't had any luck.Any suggestions would be awesome!
Beta Was this translation helpful? Give feedback.
All reactions