GCloud: List roles a service account is a member of

GCloud command to list roles a service account is a member of:

gcloud projects get-iam-policy $GCP_PROJECT \
--flatten="bindings[].members" \
--format='table(bindings.role)' \

Reference: https://jamiekt.wordpress.com/2019/06/13/use-gcloud-to-list-all-project-roles-that-a-service-account-is-a-member-of/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.