Error: "500 (Internal Server Error)" encounterd when querying user's service roles
search cancel

Error: "500 (Internal Server Error)" encounterd when querying user's service roles

book

Article ID: 398202

calendar_today

Updated On:

Products

VMware Cloud Foundation VCF Automation

Issue/Introduction

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

Environment

VCF Automation 9.0

Cause

Missing checks for the value of the field with direct roles lead to Null Pointer Exception.

Resolution

Adding direct role assignment to the given user will fix the issue.