import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.members.list({
fields: "fields",
include_fields: true,
from: "from",
take: 1,
include_totals: true,
});
}
main();
import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.members.list({
fields: "fields",
include_fields: true,
from: "from",
take: 1,
include_totals: true,
});
}
main();
package example
import (
context "context"
myorganization "github.com/auth0/myorganization-go/v2"
client "github.com/auth0/myorganization-go/v2/client"
option "github.com/auth0/myorganization-go/v2/option"
)
func do() {
c, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &myorganization.ListOrganizationMembersRequestParameters{
Fields: myorganization.String(
"fields",
),
IncludeFields: myorganization.Bool(
true,
),
From: myorganization.String(
"from",
),
Take: myorganization.Int(
1,
),
IncludeTotals: myorganization.Bool(
true,
),
}
c.Organization.Members.List(
context.TODO(),
request,
)
}
using Auth0.MyOrganizationApi;
using System.Threading.Tasks;
using Auth0.MyOrganizationApi.Organization;
public partial class Examples
{
public async Task Example() {
var client = new MyOrganizationClient(new MyOrganizationClientOptions
{
Domain = "{YOUR_DOMAIN}",
TokenProvider = new DelegateTokenProvider(_ => Task.FromResult("<token>"))
});
await client.Organization.Members.ListAsync(
new ListOrganizationMembersRequestParameters {
Fields = "fields",
IncludeFields = true,
From = "from",
Take = 1,
IncludeTotals = true
}
);
}
}
package com.example.usage;
import com.auth0.client.myorganization.auth.MyOrganizationClient;
import com.auth0.client.myorganization.organization.types.ListOrganizationMembersRequestParameters;
public class Example {
public static void main(String[] args) {
MyOrganizationClient client = MyOrganizationClient
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organization().members().list(
ListOrganizationMembersRequestParameters
.builder()
.fields("fields")
.includeFields(true)
.from("from")
.take(1)
.includeTotals(true)
.build()
);
}
}from auth0.myorganization import MyOrganizationClient
client = MyOrganizationClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organization.members.list(
fields="fields",
include_fields=True,
from_="from",
take=1,
include_totals=True,
)
curl --request GET \
--url https://{tenantDomain}/my-org/v1/members \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/my-org/v1/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"members": [
{
"user_id": "auth0|123234235",
"roles": [
{
"id": "rol_BKI0BKI0BKI0BKI0",
"name": "role1"
},
{
"id": "rol_BKW1BKIfBKd0BaI0",
"name": "role2"
}
],
"email": "roadrunner@acme.com"
}
]
}{
"type": "https://auth0.com/api-errors#A0E-400-0003",
"status": 400,
"title": "Validation Error",
"validation_errors": [
{
"detail": "is required",
"field": "data/property_name",
"pointer": "/property_name",
"source": "params"
}
]
}{
"type": "https://auth0.com/api-errors#A0E-401-0002",
"status": 401,
"title": "Missing Token",
"detail": "No auth token provided."
}{
"type": "https://auth0.com/api-errors#A0E-403-0002",
"status": 403,
"title": "Insufficient Scope",
"detail": "The auth token lacks the required scope: Check the API documentation for the required scopes for this endpoint."
}{
"type": "https://auth0.com/api-errors#A0E-404-0002",
"status": 404,
"title": "Resource Not Found",
"detail": "The organization does not exist."
}{
"type": "https://auth0.com/api-errors#A0E-429-0003",
"status": 429,
"title": "Endpoint Rate Limit Exceeded",
"detail": "The endpoint request limit has been exceeded."
}メンバーを一覧表示
この組織のすべてのメンバーの一覧を取得します。各メンバーの roles フィールドは、トークンに read:my_org:member_roles スコープも含まれている場合にのみ含まれます。このスコープがない場合、roles フィールドはレスポンスから省略されます。
import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.members.list({
fields: "fields",
include_fields: true,
from: "from",
take: 1,
include_totals: true,
});
}
main();
import { MyOrganizationClient } from "@auth0/myorganization-js";
async function main() {
const client = new MyOrganizationClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.organization.members.list({
fields: "fields",
include_fields: true,
from: "from",
take: 1,
include_totals: true,
});
}
main();
package example
import (
context "context"
myorganization "github.com/auth0/myorganization-go/v2"
client "github.com/auth0/myorganization-go/v2/client"
option "github.com/auth0/myorganization-go/v2/option"
)
func do() {
c, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &myorganization.ListOrganizationMembersRequestParameters{
Fields: myorganization.String(
"fields",
),
IncludeFields: myorganization.Bool(
true,
),
From: myorganization.String(
"from",
),
Take: myorganization.Int(
1,
),
IncludeTotals: myorganization.Bool(
true,
),
}
c.Organization.Members.List(
context.TODO(),
request,
)
}
using Auth0.MyOrganizationApi;
using System.Threading.Tasks;
using Auth0.MyOrganizationApi.Organization;
public partial class Examples
{
public async Task Example() {
var client = new MyOrganizationClient(new MyOrganizationClientOptions
{
Domain = "{YOUR_DOMAIN}",
TokenProvider = new DelegateTokenProvider(_ => Task.FromResult("<token>"))
});
await client.Organization.Members.ListAsync(
new ListOrganizationMembersRequestParameters {
Fields = "fields",
IncludeFields = true,
From = "from",
Take = 1,
IncludeTotals = true
}
);
}
}
package com.example.usage;
import com.auth0.client.myorganization.auth.MyOrganizationClient;
import com.auth0.client.myorganization.organization.types.ListOrganizationMembersRequestParameters;
public class Example {
public static void main(String[] args) {
MyOrganizationClient client = MyOrganizationClient
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organization().members().list(
ListOrganizationMembersRequestParameters
.builder()
.fields("fields")
.includeFields(true)
.from("from")
.take(1)
.includeTotals(true)
.build()
);
}
}from auth0.myorganization import MyOrganizationClient
client = MyOrganizationClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organization.members.list(
fields="fields",
include_fields=True,
from_="from",
take=1,
include_totals=True,
)
curl --request GET \
--url https://{tenantDomain}/my-org/v1/members \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/my-org/v1/members",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/my-org/v1/members")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"members": [
{
"user_id": "auth0|123234235",
"roles": [
{
"id": "rol_BKI0BKI0BKI0BKI0",
"name": "role1"
},
{
"id": "rol_BKW1BKIfBKd0BaI0",
"name": "role2"
}
],
"email": "roadrunner@acme.com"
}
]
}{
"type": "https://auth0.com/api-errors#A0E-400-0003",
"status": 400,
"title": "Validation Error",
"validation_errors": [
{
"detail": "is required",
"field": "data/property_name",
"pointer": "/property_name",
"source": "params"
}
]
}{
"type": "https://auth0.com/api-errors#A0E-401-0002",
"status": 401,
"title": "Missing Token",
"detail": "No auth token provided."
}{
"type": "https://auth0.com/api-errors#A0E-403-0002",
"status": 403,
"title": "Insufficient Scope",
"detail": "The auth token lacks the required scope: Check the API documentation for the required scopes for this endpoint."
}{
"type": "https://auth0.com/api-errors#A0E-404-0002",
"status": 404,
"title": "Resource Not Found",
"detail": "The organization does not exist."
}{
"type": "https://auth0.com/api-errors#A0E-429-0003",
"status": 429,
"title": "Endpoint Rate Limit Exceeded",
"detail": "The endpoint request limit has been exceeded."
}承認
The access token received from the authorization server in the OAuth 2.0 flow.
クエリパラメータ
結果に含める、または除外するフィールドのカンマ区切りリストです(include_fields に指定した値に基づきます)。すべてのフィールドを取得するには空のままにします。roles フィールドはデフォルトでは返されず、フィールドリストで roles が明示的に指定され(include モード)、かつトークンに read:my_org:member_roles スコープも含まれている場合にのみ含まれます。このスコープなしで roles が要求された場合、レスポンスから何も通知されずに省略されます。
1 - 255指定したフィールドを含める(true)か、除外する(false)か。既定値は true です。
選択を開始する位置を示す任意のカーソル(この値自体は含まれません)。
1 - 10001ページあたりの結果数。既定値は 50 です。
1 <= x <= 100trueの場合、レスポンスには結果セット内の項目数の'total'(有効なフィルターを反映)と'total_is_capped'フラグが含まれます。件数はベストエフォートで算出され、上限は1000です。実際の件数がそれを超える可能性がある場合、'total_is_capped'はtrueとなり、'total'は下限値となります。要求されない場合は省略されます。
レスポンス
organizationのメンバーを一覧表示します。
結果の次のページのページネーションカーソル。
結果セット内のメンバー数のベストエフォート値(有効なフィルターを反映)。include_totals=trueの場合にのみ含まれます。上限は1000です。
結果セットの実際の件数に達する前にカウントが停止したかどうか。trueの場合、'total'は下限値です(実際の件数は'total'以上)。falseの場合、'total'はカウントされた結果セット全体の件数を示します。'total'が存在する場合にのみ含まれます。
Show child attributes
Show child attributes