Role Assignment Fails with 404 for Existing Users

Overview

This article explains why the following error response occurs when attempting to assign roles to existing users via the Management API:

{"statusCode":404,"error":"Not Found","message":"One or more of the users do not exist.","errorCode":"inexistent_user"}

 

Applies To
  • Management API
  • Role assignments
Cause

The error occurs because the API request body contains duplicate user IDs within the users array. The system processes the assignment as a single transaction, and the presence of a duplicate entry causes the entire operation to fail with an inexistent user error code.

Solution
  1. Review the request body sent to the POST /api/v2/roles/<role_id>/users endpoint.
  2. Identify any duplicate user IDs within the users array.
  3. Remove the duplicate entries so that each user ID appears only once.
  4. Resend the API request.

 

Related References

Recommended content

No recommended content found...