In addition to the above, when all role's and permissions are removed the get /api/v2/users/{subjectId}/roles throws a 404 error:
{ "message": "No such user 73123f82-452a-49b5-97ad-64ed7bd9a9e4", "code": "not.found", "status": 404, "messageWithParams": "No such user {userId}", "messageParams": { "userId": "73123f82-452a-49b5-97ad-64ed7bd9a9e4" }, "contextId": "fd1243cd-185c-492e-bd11-6722d733e571", "details": [], "errors": [] }
However, I would expect an output like: "roles": [], "permissions": [], "permissionPolicies": []
------------------------------
Ruud Reinold
BNP Paribas Personal Finance UK
------------------------------
Original Message:
Sent: 03-17-2026 13:19
From: Rudy Reinold
Subject: ALL Role and Permission removal from a user by API
Dear all,
I try to remove ALL permission roles from a user using a data action, though it seems that the PUT /api/v2/users/{subjectId}/roles, which sets the user's roles, does not allow a blank input. Is it possible to remove all roles using an API ? It's possible using the users GUI via the user management > Users interface.
we would like t automate the removal of all roles when a user has been inactive for over 30 days.
#PlatformAPI
------------------------------
Ruud Reinold
BNP Paribas Personal Finance UK
------------------------------