8

I am using the Google Cloud Console for this purpose. When I create a service account, I can assign specific roles. But after I create it, I don't see an option to Update Roles of Service Accounts.

I tried to edit the service account, and still no option to add or remove roles. What am I missing here?

enter image description here

Keet Sugathadasa
  • 4,497
  • 1
  • 37
  • 53

1 Answers1

8

Once you have created a service account, to modify the roles assigned to the project for this identity (the service account), go to "IAM & Admin" then to "IAM" instead of "Service Accounts". Find the service account. Click the pencil icon at the far right. "IAM" is the first entry in the left panel of your screenshot.

Note: You can assign other IAM members with roles to a service account when the service account is a resource. Under "Service Accounts" click the checkbox next to the service account email address. A panel will open. This is the right-side panel in your screenshot. However, in your case, you are using the service account as an identity, so you need to add the roles to the project under the "IAM" section.

John Hanley
  • 44,336
  • 6
  • 35
  • 81
  • This helped. Now I see what I was missing. I wish GCP had thought of adding a little bit of redundancy in the console, for functionality. I found it easy on AWS to find my way through, without guides. Thank you for the answer – Keet Sugathadasa May 17 '20 at 06:38
  • I think this changed during the past years. Can one still change roles of an existing service account? – Jari Turkia Nov 06 '20 at 15:32
  • 1
    Finally found it! In IAM, there is Edit permissions for a service account. In Service Accounts there is not. – Jari Turkia Nov 08 '20 at 17:10
  • Not all service accounts can be configured through the interface. For example, use the `gcloud` command-line tool instead of the Cloud Console, because the `firebaserules.system` role is **hidden** in the console by default [Security for server client libraries  |  Firestore  |  Google Cloud](https://cloud.google.com/firestore/docs/security/iam#security_rule_dependency_on_iam) – contributorpw Jan 08 '21 at 18:04