ForeverConfused
ForeverConfused

Reputation: 1777

How do I see the permissions granted on a service account from the command line?

I've found commands line gcloud auth list and gcloud auth activate-service-account but I don't see a way to list current permissions on a service account. The console only lets me see the old pre-baked permission list.

Upvotes: 3

Views: 5024

Answers (1)

Mahmoud Sharif
Mahmoud Sharif

Reputation: 1103

Within the Cloud Shell, you may run the command below. This command will list all the service accounts within a project and list all the service accounts' permissions.

$ gcloud projects get-iam-policy [project-name]

Upvotes: 4

Related Questions