C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations.Members;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Organizations.Members.Roles.ListAsync(
id: "id",
userId: "user_id",
request: new ListOrganizationMemberRolesRequestParameters {
Page = 1,
PerPage = 1,
IncludeTotals = true
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
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.ListOrganizationMemberRolesRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
}
client.Organizations.Members.Roles.List(
context.TODO(),
"id",
"user_id",
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.organizations.members.roles.requests.ListOrganizationMemberRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.organizations().members().roles().list(
"id",
"user_id",
ListOrganizationMemberRolesRequestParameters
.builder()
.page(1)
.perPage(1)
.includeTotals(true)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Organizations\Members\Roles\Requests\ListOrganizationMemberRolesRequestParameters;
$client = new Management(
token: '<token>',
);
$client->organizations->members->roles->list(
'id',
'user_id',
new ListOrganizationMemberRolesRequestParameters([
'page' => 1,
'perPage' => 1,
'includeTotals' => true,
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.organizations.members.roles.list(
id="id",
user_id="user_id",
page=1,
per_page=1,
include_totals=True,
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.organizations.members.roles.list(
id: "id",
user_id: "user_id",
page: 1,
per_page: 1,
include_totals: true
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.members.roles.list("id", "user_id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.members.roles.list("id", "user_id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{id}/members/{user_id}/roles \
--header 'Authorization: Bearer <token>'[
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
]Get user roles assigned to an Organization member
Retrieve detailed list of roles assigned to a given user within the context of a specific Organization.
Users can be members of multiple Organizations with unique roles assigned for each membership. This action only returns the roles associated with the specified Organization; any roles assigned to the user within other Organizations are not included.
GET
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
members
/
{user_id}
/
roles
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations.Members;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Organizations.Members.Roles.ListAsync(
id: "id",
userId: "user_id",
request: new ListOrganizationMemberRolesRequestParameters {
Page = 1,
PerPage = 1,
IncludeTotals = true
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
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.ListOrganizationMemberRolesRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
}
client.Organizations.Members.Roles.List(
context.TODO(),
"id",
"user_id",
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.organizations.members.roles.requests.ListOrganizationMemberRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.organizations().members().roles().list(
"id",
"user_id",
ListOrganizationMemberRolesRequestParameters
.builder()
.page(1)
.perPage(1)
.includeTotals(true)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Organizations\Members\Roles\Requests\ListOrganizationMemberRolesRequestParameters;
$client = new Management(
token: '<token>',
);
$client->organizations->members->roles->list(
'id',
'user_id',
new ListOrganizationMemberRolesRequestParameters([
'page' => 1,
'perPage' => 1,
'includeTotals' => true,
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.organizations.members.roles.list(
id="id",
user_id="user_id",
page=1,
per_page=1,
include_totals=True,
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.organizations.members.roles.list(
id: "id",
user_id: "user_id",
page: 1,
per_page: 1,
include_totals: true
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.members.roles.list("id", "user_id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.organizations.members.roles.list("id", "user_id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{id}/members/{user_id}/roles \
--header 'Authorization: Bearer <token>'[
{
"id": "<string>",
"name": "<string>",
"description": "<string>"
}
]承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
Organization identifier.
Maximum string length:
50ID of the user to associate roles with.
クエリパラメータ
Page index of the results to return. First page is 0.
必須範囲:
0 <= x <= 1000Number of results per page. Defaults to 50.
必須範囲:
1 <= x <= 100Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
⌘I