When a given user has only inherited roles, i.e. roles that are coming from parent group and are not directly assigned to that user, an error response code of 500 (Internal Server Error) is returned when trying to call the following identity-service APIs:
- GET /csp/gateway/am/api/loggedin/user/orgs/{{orgId}}/service-roles- PATCH /csp/gateway/am/api/users/{{userId}}/orgs/{{orgId}}/service-roles- PATCH /csp/gateway/am/api/users/{{userId}}/orgs/{{orgId}}/roles
VCF Automation 9.0
Missing checks for the value of the field with direct roles lead to Null Pointer Exception.
Adding direct role assignment to the given user will fix the issue.