Remove Role from User
- Print
- DarkLight
- PDF
Remove Role from User
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/roles.removeUserFromRole
Permission required: access-permissions
Remove a role from a user. Optionally, you can remove this role from a specified scope.
Header parameters
X-User-Id
stringRequired
The authenticated user ID.
ExamplerbAXPnMktTFbNpwtJ
X-Auth-Token
stringRequired
The authenticated user token.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
Body parameters
object
roleId
string Required
The ID of an existing role.
Example6579adcf2dd9f9d9514f6
username
string Required
The username for which you want to remove the role.
Exampleuser08
Responses
200
OK
Success
{
"success": true
}
object
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "The role properties are invalid. [error-invalid-role-properties]",
"errorType": "error-invalid-role-properties"
}
Example 2
{
"success": false,
"error": "Accessing permissions is not allowed [error-action-not-allowed]",
"errorType": "error-action-not-allowed"
}
object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?