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

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

        await client.Users.Roles.DeleteAsync(
            id: "id",
            request: new DeleteUserRolesRequestContent {
                Roles = new List<string>(){
                    "roles",
                }

            }
        );
    }

}

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 user to remove roles from.

Body

roles
string[]
required

List of roles IDs to remove from the user.

Minimum array length: 1
Minimum string length: 1

Response

Users roles successfully removed.