Search code examples
google-cloud-functionsservice-accountsgoogle-cloud-iam

Google Cloud Policy Troubleshooter says service account doesn't have permissions despite being assigned in IAM


I have added the role "Cloud Tasks Enqueuer" to my [email protected] service account (see first screenshot). However, when I try and check if the account has permission to call "cloudtasks.tasks.create" it says that the service account lacks the cloudtasks.enquerer role (second screenshot). What is going wrong?

(note: I am adding this role to try and solve my other question, creating Google Cloud Task in a firebase function)

service account shows role Cloud Tasks Enqueuer debugger shows no permission


Solution

  • Whoops, turned out that I had two projects with similar names, and I got confused. The firebase project was project-prod created through firebase, and the google cloud project was project created through google cloud.

    Therefore, I granted permissions to the correct service account but for the wrong project. The debugger was working correctly!