using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations.Roles;
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.Roles.Members.ListAsync(
id: "id",
roleId: "role_id",
request: new ListOrganizationRoleMembersRequestParameters {
From = "from",
Take = 1,
Fields = "fields",
IncludeFields = true
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleMembersRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().roles().members().list(
"id",
"role_id",
ListOrganizationRoleMembersRequestParameters
.builder()
.from("from")
.take(1)
.fields("fields")
.includeFields(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\Roles\Members\Requests\ListOrganizationRoleMembersRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->roles->members->list(
'id',
'role_id',
new ListOrganizationRoleMembersRequestParameters([
'from' => 'from',
'take' => 1,
'fields' => 'fields',
'includeFields' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.roles.members.list(
id="id",
role_id="role_id",
from="from",
take=1,
fields="fields",
include_fields=True,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.roles.members.list(
id: "id",
role_id: "role_id",
from: "from",
take: 1,
fields: "fields",
include_fields: true
)
curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{id}/roles/{role_id}/members \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/organizations/{id}/roles/{role_id}/members', 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/organizations/{id}/roles/{role_id}/members"
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))
}{
"members": [
{
"user_id": "<string>",
"picture": "<string>",
"name": "<string>",
"email": "jsmith@example.com"
}
],
"next": "<string>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}List the members assigned to a role in the context of an organization
List the organization members assigned a specific role within the context of an organization.
Note: Returns only members with direct role assignments. For groups assigned to this role within the organization, use
GET /api/v2/organizations//roles//groups.
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations.Roles;
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.Roles.Members.ListAsync(
id: "id",
roleId: "role_id",
request: new ListOrganizationRoleMembersRequestParameters {
From = "from",
Take = 1,
Fields = "fields",
IncludeFields = true
}
);
}
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.roles.types.ListOrganizationRoleMembersRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().roles().members().list(
"id",
"role_id",
ListOrganizationRoleMembersRequestParameters
.builder()
.from("from")
.take(1)
.fields("fields")
.includeFields(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\Roles\Members\Requests\ListOrganizationRoleMembersRequestParameters;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->roles->members->list(
'id',
'role_id',
new ListOrganizationRoleMembersRequestParameters([
'from' => 'from',
'take' => 1,
'fields' => 'fields',
'includeFields' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.roles.members.list(
id="id",
role_id="role_id",
from="from",
take=1,
fields="fields",
include_fields=True,
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.roles.members.list(
id: "id",
role_id: "role_id",
from: "from",
take: 1,
fields: "fields",
include_fields: true
)
curl --request GET \
--url https://{tenantDomain}/api/v2/organizations/{id}/roles/{role_id}/members \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/organizations/{id}/roles/{role_id}/members', 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/organizations/{id}/roles/{role_id}/members"
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))
}{
"members": [
{
"user_id": "<string>",
"picture": "<string>",
"name": "<string>",
"email": "jsmith@example.com"
}
],
"next": "<string>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
ID of the organization.
ID of the role to retrieve the assigned members for.
クエリパラメータ
Optional Id from which to start selection.
Number of results per page. Defaults to 50. Values above the maximum permitted size are capped.
x >= 1Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
Whether specified fields are to be included (true) or excluded (false). Defaults to true.