Single command to remove user roles in PCF

125 Views Asked by At

I want to remove all the roles assigned to the user(Space auditor, space manager, org manager, ect.,) , without deleting his ID with "cf delete-user", I want their ID still to exist with the uaac but remove all cloudfoundry roles alone, is there a code /command for that?

1

There are 1 best solutions below

0
arjain13 On

You can do this using the following command but it doesn't allow multiple roles in single command. However you can wrap these into a small script and can run it with different roles for desired user:

org level roles

cf unset-org-role USERNAME ORGANIZATION-NAME ROLE

where ROLE: OrgManager, BillingManager and OrgAuditor

space level roles:

cf unset-space-role USERNAME ORGANIZATION-NAME SPACE-NAME ROLE

where ROLE: SpaceManager, SpaceDeveloper and SpaceAuditor