Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to list roles & permissions assigned to a user associated with a firebase project

I am interested in listing all the roles & permissions a user has been assigned including custom roles through the Google Cloud SDK.

In CLI, I ran the following command but it lists all the roles available in the project without respecting the filter. It also doesn't list the custom roles.

gcloud projects get-iam-policy my-project-id --filter="bindings.members:user@company.com"

Alternatively, can I list all the users under a custom role?

0 1 3,118
1 REPLY 1

Hello vinaypotluri,

Here is a documentation from Stack Exchange provided by manasouza

"

That can be achieved using another gcloud command:

gcloud beta asset search-all-iam-policies --query policy:"roles/owner" --project $your_project_id --flatten="results[].policy[]" --format="csv(bindings.members[0])"

"