Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Policy binding with the specified member, role, and condition not found!

I am unable to delete the user role via gcloud

gcloud projects remove-iam-policy-binding test-project-gcp-console –member=’user:/abc@yahoo.com’ –role=’roles/viewer’

ERROR: (gcloud.projects.remove-iam-policy-binding) Policy binding with the specified member, role, and condition not found!

I added a new user as Viewer via console and the bindings are present. 

gcloud projects get-iam-policy test-project-gcp-console

bindings:

  • members:

  • serviceAccount:service-877498352829@compute-system.iam.gserviceaccount.com

role: roles/compute.serviceAgent

  • members:

  • serviceAccount:877498352829-compute@developer.gserviceaccount.com

  • serviceAccount:877498352829@cloudservices.gserviceaccount.com

role: roles/editor

  • members:

  • user:xyz@gmail.com

role: roles/owner

  • members:

  • user:abc@yahoo.com

role: roles/viewer

etag: BwW3OaSDPh0=

version: 1

1 Answers

Looks like a syntax glitch (extra forward slash in member value), please try this command:

gcloud projects remove-iam-policy-binding test-project-gcp-console --member='user:abc@yahoo.com' --role='roles/viewer'
Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?