Skip to main content
POST
https://{tenantDomain}/api/v2
/
roles
/
{id}
/
users
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Roles;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Roles.Users.AssignAsync(
            id: "id",
            request: new AssignRoleUsersRequestContent {
                Users = new List<string>(){
                    "users",
                }

            }
        );
    }

}

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.