package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
members "github.com/auth0/go-auth0/management/management/organizations/members"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &members.AssignOrganizationMemberRolesRequestContent{
Roles: []string{
"roles",
},
}
client.Organizations.Members.Roles.Assign(
context.TODO(),
"id",
"user_id",
request,
)
}Assign one or more roles to a user to determine their access for a specific Organization.
Users can be members of multiple Organizations with unique roles assigned for each membership. This action assigns roles to a user only for the specified Organization. Roles cannot be assigned to a user across multiple Organizations in the same call.
package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
members "github.com/auth0/go-auth0/management/management/organizations/members"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &members.AssignOrganizationMemberRolesRequestContent{
Roles: []string{
"roles",
},
}
client.Organizations.Members.Roles.Assign(
context.TODO(),
"id",
"user_id",
request,
)
}Documentation Index
Fetch the complete documentation index at: https://auth0-chore-sdk-version-update-20260521.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.
Organization identifier.
50ID of the user to associate roles with.
List of roles IDs to associated with the user.
1Roles successfully associated with user.
このページは役に立ちましたか?