I believe you'll find some answers on this Stack Overflow thread. Good luck! The docs took me a bit to grok, too. Usually assembling search engine strings like gcloud [title of console tool i was trying to find a CLI version of]
seems to work.
EDIT, 3 years later!
The command you're looking for is:
gcloud projects get-iam-policy <project-id>
# Example:
gcloud projects get-iam-policy my-fancy-project
This is assuming, of course, that the IAM permissions are assigned to the users at the project level. You may also want to do a gcloud organizations get-iam-policy
to get any permissions inherited from the parent organization.
This feels unnatural if you're like me and are expecting to see IAM-y things in the gcloud iam
section - but for some reason, this information is only accessible when looking at the project and org.
Anyway, I stumbled upon this information today while I was searching for this info and found a reference to adding a policy binding...under the subcommand of gcloud projects
. Mind: blown. GCP has come a long way in 3 years, but it's still...kinda weird.