メインコンテンツへスキップ
DELETE
https://{tenantDomain}/api/v2
/
users
/
{id}
/
roles
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    users "github.com/auth0/go-auth0/management/users"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Users.Roles.Delete(
        context.TODO(),
        "id",
        &users.DeleteUserRolesRequestContent{
            Roles: []string{
                "roles",
            },
        },
    )
}

承認

Authorization
string
header
必須

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

パスパラメータ

id
string
必須

ID of the user to remove roles from.

ボディ

roles
string[]
必須

List of roles IDs to remove from the user.

Minimum array length: 1
Minimum string length: 1

レスポンス

Users roles successfully removed.