package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
users "github.com/auth0/go-auth0/management/management/users"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &users.DeleteUserRolesRequestContent{
Roles: []string{
"roles",
},
}
client.Users.Roles.Delete(
context.TODO(),
"id",
request,
)
}Remove one or more specified user roles assigned to a user.
Note: This action removes a role from a user in the context of your whole tenant. If you want to unassign a role from a user in the context of a specific Organization, use the following endpoint: Delete user roles from an Organization member.
package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
users "github.com/auth0/go-auth0/management/management/users"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &users.DeleteUserRolesRequestContent{
Roles: []string{
"roles",
},
}
client.Users.Roles.Delete(
context.TODO(),
"id",
request,
)
}Documentation Index
Fetch the complete documentation index at: https://auth0-quickstart-flutter-windows.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of the user to remove roles from.
List of roles IDs to remove from the user.
11Users roles successfully removed.
このページは役に立ちましたか?