Assigning roles

i am trying to create user through API then assign it auditor ,so the chat will be read only for him
i gave user permission to assign Roles but when i run the API i got 400 Bad Request
{
“success”: false,
“error”: “Accessing permissions is not allowed [error-action-not-allowed]”,
“errorType”: “error-action-not-allowed”,
“details”: {
“method”: “authorization:addUserToRole”,
“action”: “Accessing_permissions”
}
}

What version of Rocket.Chat do you have? What is your setup?

You really need to read ALL this and learn to provide some proper information.

We just can’t help you without some basics.

Also read all this:

https://developer.rocket.chat/apidocs/assign-role-to-user

then assign it auditor

Auditor? No idea what you mean?

Also note:

By default, the three major room roles are available in Rocket.Chat are Owner , Leader , and Moderator . Creating custom roles is exclusively available on the Enterprise plan.