# Remove Role Assignments **DELETE /users/{user_id}/role_assignments** Removes a set of RoleAssignments from the specified User. Currently unavailable in self-hosted ECE. ## Servers - https://api.elastic-cloud.com/api/v1: https://api.elastic-cloud.com/api/v1 () ## Parameters ### Path parameters - **user_id** (string) Identifier for the user; include realm name and id if required ### Body: application/json (object) The Role Assignments to remove - **platform** (array[object]) Assignments for roles with platform scope. - **organization** (array[object]) Assignments for roles with organization scope. - **deployment** (array[object]) Assignments for roles with deployment scope. - **project** (object) Assignments for roles with project scope. ## Responses ### 200 Role Assignments were successfully removed from the target User #### Body: application/json (object) object ### 400 The target user Id is invalid. (code: `role_assignments.invalid_target_user_id`) #### Headers - **x-cloud-error-codes** (string) The error codes associated with the response #### Body: application/json (object) - **errors** (array[object]) A list of errors that occurred in the failing request ### 401 Credentials were invalid. (code: `root.unauthorized`) #### Headers - **x-cloud-error-codes** (string) The error codes associated with the response #### Body: application/json (object) - **errors** (array[object]) A list of errors that occurred in the failing request ### 403 You are not authorised to remove the specified RoleAssignments. (code: `role_assignments.unauthorized_role_assignments`) #### Headers - **x-cloud-error-codes** (string) The error codes associated with the response #### Body: application/json (object) - **errors** (array[object]) A list of errors that occurred in the failing request [Powered by Bump.sh](https://bump.sh)