using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Users;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Users.Organizations.ListAsync(
id: "id",
request: new ListUserOrganizationsRequestParameters {
Page = 1,
PerPage = 1,
IncludeTotals = true
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
users "github.com/auth0/go-auth0/management/management/users"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &users.ListUserOrganizationsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
}
client.Users.Organizations.List(
context.TODO(),
"id",
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.users.organizations.requests.ListUserOrganizationsRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.users().organizations().list(
"id",
ListUserOrganizationsRequestParameters
.builder()
.page(1)
.perPage(1)
.includeTotals(true)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Users\Organizations\Requests\ListUserOrganizationsRequestParameters;
$client = new Management(
token: '<token>',
);
$client->users->organizations->list(
'id',
new ListUserOrganizationsRequestParameters([
'page' => 1,
'perPage' => 1,
'includeTotals' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.users.organizations.list(
id="id",
page=1,
per_page=1,
include_totals=True,
)
require "auth0"
client = Auth0::Management.new(token: "<token>")
client.users.organizations.list(
id: "id",
page: 1,
per_page: 1,
include_totals: true
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.users.organizations.list("id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.users.organizations.list("id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/users/{id}/organizations \
--header 'Authorization: Bearer <token>'[
{
"id": "<string>",
"name": "organization-1",
"display_name": "Acme Users",
"branding": {
"logo_url": "<string>",
"colors": {
"primary": "<string>",
"page_background": "<string>"
}
},
"metadata": {},
"token_quota": {
"client_credentials": {
"enforce": true,
"per_day": 1073741824,
"per_hour": 1073741824
}
}
}
]List user's organizations
Retrieve list of the specified user’s current Organization memberships. User must be specified by user ID. For more information, review Auth0 Organizations.
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Users;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Users.Organizations.ListAsync(
id: "id",
request: new ListUserOrganizationsRequestParameters {
Page = 1,
PerPage = 1,
IncludeTotals = true
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
users "github.com/auth0/go-auth0/management/management/users"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &users.ListUserOrganizationsRequestParameters{
Page: management.Int(
1,
),
PerPage: management.Int(
1,
),
IncludeTotals: management.Bool(
true,
),
}
client.Users.Organizations.List(
context.TODO(),
"id",
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.users.organizations.requests.ListUserOrganizationsRequestParameters;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.users().organizations().list(
"id",
ListUserOrganizationsRequestParameters
.builder()
.page(1)
.perPage(1)
.includeTotals(true)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Users\Organizations\Requests\ListUserOrganizationsRequestParameters;
$client = new Management(
token: '<token>',
);
$client->users->organizations->list(
'id',
new ListUserOrganizationsRequestParameters([
'page' => 1,
'perPage' => 1,
'includeTotals' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.users.organizations.list(
id="id",
page=1,
per_page=1,
include_totals=True,
)
require "auth0"
client = Auth0::Management.new(token: "<token>")
client.users.organizations.list(
id: "id",
page: 1,
per_page: 1,
include_totals: true
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.users.organizations.list("id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.users.organizations.list("id", {
page: 1,
perPage: 1,
includeTotals: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/users/{id}/organizations \
--header 'Authorization: Bearer <token>'[
{
"id": "<string>",
"name": "organization-1",
"display_name": "Acme Users",
"branding": {
"logo_url": "<string>",
"colors": {
"primary": "<string>",
"page_background": "<string>"
}
},
"metadata": {},
"token_quota": {
"client_credentials": {
"enforce": true,
"per_day": 1073741824,
"per_hour": 1073741824
}
}
}
]承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
ID of the user to retrieve the organizations for.
クエリパラメータ
Page index of the results to return. First page is 0.
0 <= x <= 1000Number of results per page. Defaults to 50.
1 <= x <= 100Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
レスポンス
Organizations successfully retrieved.
- object[]
- object
Organization identifier.
50The name of this organization.
1 - 50Friendly name of this organization.
1 - 255Theme defines how to style the login pages.
Show child attributes
Show child attributes
Metadata associated with the organization, in the form of an object with string values (max 255 chars). Maximum of 25 metadata properties allowed.
Show child attributes
Show child attributes
Show child attributes
Show child attributes