package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
roles "github.com/auth0/go-auth0/management/management/roles"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &roles.AssignRoleUsersRequestContent{
Users: []string{
"users",
},
}
client.Roles.Users.Assign(
context.TODO(),
"id",
request,
)
}Assign one or more users to an existing user role. To learn more, review Role-Based Access Control.
Note: New roles cannot be created through this action.
package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
roles "github.com/auth0/go-auth0/management/management/roles"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &roles.AssignRoleUsersRequestContent{
Users: []string{
"users",
},
}
client.Roles.Users.Assign(
context.TODO(),
"id",
request,
)
}Documentation Index
Fetch the complete documentation index at: https://auth0-feat-custom-rate-limit-policies.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 role to assign users to.
user_id's of the users to assign the role to.
Role users successfully updated.
Cette page vous a-t-elle été utile ?