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.EffectivePermissions.ListAsync(
id: "id",
request: new ListUserEffectivePermissionsRequestParameters {
From = "from",
Take = 1,
ResourceServerIdentifier = "resource_server_identifier"
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.users.types.ListUserEffectivePermissionsRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.users().effectivePermissions().list(
"id",
ListUserEffectivePermissionsRequestParameters
.builder()
.resourceServerIdentifier("resource_server_identifier")
.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\EffectivePermissions\Requests\ListUserEffectivePermissionsRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->users->effectivePermissions->list(
'id',
new ListUserEffectivePermissionsRequestParameters([
'from' => 'from',
'take' => 1,
'resourceServerIdentifier' => 'resource_server_identifier',
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.users.effective_permissions.list(
id="id",
from="from",
take=1,
resource_server_identifier="resource_server_identifier",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.users.effective_permissions.list(
id: "id",
from: "from",
take: 1,
resource_server_identifier: "resource_server_identifier"
)
curl --request GET \
--url https://{tenantDomain}/api/v2/users/{id}/effective-permissions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/users/{id}/effective-permissions', 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-permissions"
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))
}{
"permissions": [
{
"resource_server_identifier": "<string>",
"permission_name": "<string>",
"resource_server_name": "<string>",
"description": "<string>",
"sources": []
}
],
"next": "<string>"
}Lists the permissions assigned to a user directly or through roles or groups.
Returns the list of effective permissions for a user, taking into account permissions granted directly to the user, as well as those inherited through roles and group memberships.
GET
https://{tenantDomain}/api/v2
/
users
/
{id}
/
effective-permissions
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.EffectivePermissions.ListAsync(
id: "id",
request: new ListUserEffectivePermissionsRequestParameters {
From = "from",
Take = 1,
ResourceServerIdentifier = "resource_server_identifier"
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.users.types.ListUserEffectivePermissionsRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.users().effectivePermissions().list(
"id",
ListUserEffectivePermissionsRequestParameters
.builder()
.resourceServerIdentifier("resource_server_identifier")
.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\EffectivePermissions\Requests\ListUserEffectivePermissionsRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->users->effectivePermissions->list(
'id',
new ListUserEffectivePermissionsRequestParameters([
'from' => 'from',
'take' => 1,
'resourceServerIdentifier' => 'resource_server_identifier',
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.users.effective_permissions.list(
id="id",
from="from",
take=1,
resource_server_identifier="resource_server_identifier",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.users.effective_permissions.list(
id: "id",
from: "from",
take: 1,
resource_server_identifier: "resource_server_identifier"
)
curl --request GET \
--url https://{tenantDomain}/api/v2/users/{id}/effective-permissions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/users/{id}/effective-permissions', 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-permissions"
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))
}{
"permissions": [
{
"resource_server_identifier": "<string>",
"permission_name": "<string>",
"resource_server_name": "<string>",
"description": "<string>",
"sources": []
}
],
"next": "<string>"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the user to retrieve the permissions for.
Query Parameters
Optional Id from which to start selection.
Number of results per page. Defaults to 50.
Required range:
x >= 1The identifier of the resource server for which to calculate user permissions.
Required string length:
1 - 600Get a User's Connected Accounts
Previous
Lists the roles which grant the user a given permission (whether directly or through groups).
Next
⌘I