Skip to main content
POST
/
roles
/
{id}
/
users
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.roles.users.assign("id", {
        users: [
            "users",
        ],
    });
}
main();

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the role to assign users to.

Body

users
string<user-id-with-max-length>[]
required

user_id's of the users to assign the role to.

Response

Role users successfully updated.