C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Users;
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.Users.EffectiveRoles.ListAsync(
id: "id",
request: new ListUserEffectiveRolesRequestParameters {
From = "from",
Take = 1
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.users.types.ListUserEffectiveRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.users().effectiveRoles().list(
"id",
ListUserEffectiveRolesRequestParameters
.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\Users\EffectiveRoles\Requests\ListUserEffectiveRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->users->effectiveRoles->list(
'id',
new ListUserEffectiveRolesRequestParameters([
'from' => 'from',
'take' => 1,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.users.effective_roles.list(
id="id",
from="from",
take=1,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.users.effective_roles.list(
id: "id",
from: "from",
take: 1
)
curl --request GET \
--url https://{tenantDomain}/api/v2/users/{id}/effective-roles \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/users/{id}/effective-roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/users/{id}/effective-roles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"sources": []
}
],
"next": "<string>"
}List the roles for a user with sources: directly assigned or through group membership.
Retrieve detailed list of effective roles for a user, including roles assigned directly and through group memberships.
GET
https://{tenantDomain}/api/v2
/
users
/
{id}
/
effective-roles
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Users;
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.Users.EffectiveRoles.ListAsync(
id: "id",
request: new ListUserEffectiveRolesRequestParameters {
From = "from",
Take = 1
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.users.types.ListUserEffectiveRolesRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.users().effectiveRoles().list(
"id",
ListUserEffectiveRolesRequestParameters
.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\Users\EffectiveRoles\Requests\ListUserEffectiveRolesRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->users->effectiveRoles->list(
'id',
new ListUserEffectiveRolesRequestParameters([
'from' => 'from',
'take' => 1,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.users.effective_roles.list(
id="id",
from="from",
take=1,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.users.effective_roles.list(
id: "id",
from: "from",
take: 1
)
curl --request GET \
--url https://{tenantDomain}/api/v2/users/{id}/effective-roles \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/users/{id}/effective-roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/users/{id}/effective-roles"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"sources": []
}
],
"next": "<string>"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
ID of the user to list effective roles for.
クエリパラメータ
Optional Id from which to start selection.
Number of results per page. Defaults to 50.
必須範囲:
x >= 1List the roles which grant the user a given permission (whether directly or through groups).
前へ
Get a user's role source groups
次へ
⌘I