Passer au contenu principal
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();

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

ID of the role to assign users to.

Corps

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

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

Réponse

Role users successfully updated.