C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations.Members;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
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/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ListOrganizationMemberRolesRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
}
mgmt.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.organizations.members.types.ListOrganizationMemberRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.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\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Members\Roles\Requests\ListOrganizationMemberRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
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(
domain="{YOUR_DOMAIN}",
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>", base_url: "https://{YOUR_DOMAIN}/api/v2")
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({
domain: "{YOUR_DOMAIN}",
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({
domain: "{YOUR_DOMAIN}",
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>'[
{
"description": "<string>",
"id": "<string>",
"name": "<string>",
"owner_id": "<string>"
}
]organization のメンバーのロールを取得
特定の Organization のコンテキストで、指定したユーザーに割り当てられている roles の詳細一覧を取得します。
Users は複数の Organizations に所属でき、各メンバーシップに対してそれぞれ異なる roles を割り当てることができます。この action では、指定した Organization に関連付けられた roles のみが返されます。ほかの Organizations でそのユーザーに割り当てられている roles は含まれません。
注: このメンバーに直接割り当てられた role のみを返します。グループベースの role 割り当ても含めるには、GET /api/v2/organizations/{id}/members/{user_id}/effective-roles を使用します。
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 ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
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/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ListOrganizationMemberRolesRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
}
mgmt.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.organizations.members.types.ListOrganizationMemberRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.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\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Members\Roles\Requests\ListOrganizationMemberRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
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(
domain="{YOUR_DOMAIN}",
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>", base_url: "https://{YOUR_DOMAIN}/api/v2")
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({
domain: "{YOUR_DOMAIN}",
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({
domain: "{YOUR_DOMAIN}",
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>'[
{
"description": "<string>",
"id": "<string>",
"name": "<string>",
"owner_id": "<string>"
}
]承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
クエリパラメータ
返す結果のページ index。最初のページは0です。
必須範囲:
0 <= x <= 10001ページあたりの結果数。既定値は50です。
必須範囲:
1 <= x <= 100結果を、合計件数を含むオブジェクト内に返す(true)か、結果の array を直接返す(false、既定)かを指定します。
⌘I