Passer au contenu principal
DELETE
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
members
/
{user_id}
/
roles
Go
package example

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

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Organizations.Members.Roles.Delete(
        context.TODO(),
        "id",
        "user_id",
        &members.DeleteOrganizationMemberRolesRequestContent{
            Roles: []string{
                "roles",
            },
        },
    )
}

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

Organization identifier.

Maximum string length: 50
user_id
string
requis

User ID of the organization member to remove roles from.

Corps

roles
string<role-id>[]
requis

List of roles IDs associated with the organization member to remove.

Minimum array length: 1

Réponse

Roles successfully removed from organization member.