TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.groups.roles.list("id", {
from: "from",
take: 1,
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.groups.roles.list("id", {
from: "from",
take: 1,
});
}
main();
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.ListGroupRolesRequestParameters{
From: management.String(
"from",
),
Take: management.Int(
1,
),
}
mgmt.Groups.Roles.List(
context.TODO(),
"id",
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api get "groups/id/roles" --query "from=from" --query "take=1"using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Groups;
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.Groups.Roles.ListAsync(
id: "id",
request: new ListGroupRolesRequestParameters {
From = "from",
Take = 1
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.groups.types.ListGroupRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.groups().roles().list(
"id",
ListGroupRolesRequestParameters
.builder()
.from("from")
.take(1)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Groups\Roles\Requests\ListGroupRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->groups->roles->list(
'id',
new ListGroupRolesRequestParameters([
'from' => 'from',
'take' => 1,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.groups.roles.list(
id="id",
from_="from",
take=1,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.groups.roles.list(
id: "id",
from: "from",
take: 1
)
curl --request GET \
--url https://{tenantDomain}/api/v2/groups/{id}/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "tenant",
"owner_id": "<string>"
}
],
"next": "<string>"
}グループのロールを取得
グループに割り当てられているロールを一覧表示します。
GET
https://{tenantDomain}/api/v2
/
groups
/
{id}
/
roles
TypeScript
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.groups.roles.list("id", {
from: "from",
take: 1,
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.groups.roles.list("id", {
from: "from",
take: 1,
});
}
main();
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.ListGroupRolesRequestParameters{
From: management.String(
"from",
),
Take: management.Int(
1,
),
}
mgmt.Groups.Roles.List(
context.TODO(),
"id",
request,
)
}
# Ensure you're logged in: auth0 login
auth0 api get "groups/id/roles" --query "from=from" --query "take=1"using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Groups;
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.Groups.Roles.ListAsync(
id: "id",
request: new ListGroupRolesRequestParameters {
From = "from",
Take = 1
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.groups.types.ListGroupRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.groups().roles().list(
"id",
ListGroupRolesRequestParameters
.builder()
.from("from")
.take(1)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Groups\Roles\Requests\ListGroupRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->groups->roles->list(
'id',
new ListGroupRolesRequestParameters([
'from' => 'from',
'take' => 1,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.groups.roles.list(
id="id",
from_="from",
take=1,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.groups.roles.list(
id: "id",
from: "from",
take: 1
)
curl --request GET \
--url https://{tenantDomain}/api/v2/groups/{id}/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "tenant",
"owner_id": "<string>"
}
],
"next": "<string>"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
グループの一意の識別子(サービスによって生成)。
Required string length:
18 - 26