Pivotal Knowledge Base

Follow

"Server error, error code: 1002, message: cannot set space role because user is not part of the org" error message seen when using cf set-space-role

Environment

Product Version
Pivotal Cloud Foundry® (PCF) 1.5.x, 1.6.x, 1.7.x

Symptom

When a user is trying to set a space-role using cf set-space-role, they get the following error:

FAILED
Server error, error code: 1002, message: cannot set space role because user is not part of the org

Cause

This happens because the admin user is trying to set a space-role for a specific user without setting an org-role. For the user to belong to particular space (by getting a space-role), the user must be part of the org (that the space resides in) first (by getting an org-role).


Resolution

Resolving this issue is quite easy. Simply issue the following command:

$ cf set-org-role USERNAME ORG (OrgManager/BillingManager/OrgAuditor)

After the user has an org-role set for them, any org or space admin should be able to use the cf set-space-role to set a space-role for the user.

 

 

Comments

Powered by Zendesk