C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Clients;
using System.Collections.Generic;
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.Clients.Connections.GetAsync(
id: "id",
request: new ConnectionsGetRequest {
Strategy = new List<ConnectionStrategyEnum>(){
ConnectionStrategyEnum.Ad,
}
,
From = "from",
Take = 1,
Fields = "fields",
IncludeFields = true
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ConnectionsGetRequest{
From: management.String(
"from",
),
Take: management.Int(
1,
),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
}
mgmt.Clients.Connections.Get(
context.TODO(),
"id",
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.clients.types.ConnectionsGetRequest;
import com.auth0.client.mgmt.types.ConnectionStrategyEnum;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.clients().connections().get(
"id",
ConnectionsGetRequest
.builder()
.strategy(
Arrays.asList(ConnectionStrategyEnum.AD)
)
.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\Clients\Connections\Requests\ConnectionsGetRequest;
use Auth0\SDK\API\Management\Types\ConnectionStrategyEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->clients->connections->get(
'id',
new ConnectionsGetRequest([
'strategy' => [
ConnectionStrategyEnum::Ad->value,
],
'from' => 'from',
'take' => 1,
'fields' => 'fields',
'includeFields' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.clients.connections.get(
id="id",
strategy=[
"ad"
],
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.clients.connections.get(
id: "id",
strategy: ["ad"],
from: "from",
take: 1,
fields: "fields",
include_fields: true
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.clients.connections.get("id", {
from: "from",
take: 1,
fields: "fields",
includeFields: true,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.clients.connections.get("id", {
from: "from",
take: 1,
fields: "fields",
includeFields: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/clients/{id}/connections \
--header 'Authorization: Bearer <token>'{
"connections": [
{
"authentication": {
"active": true
},
"connected_accounts": {
"active": true,
"allow_missing_user_id": true,
"cross_app_access": true
},
"cross_app_access_requesting_app": {
"active": true
},
"cross_app_access_resource_app": {},
"display_name": "<string>",
"id": "con_0000000000000001",
"is_domain_connection": true,
"metadata": {},
"name": "My connection",
"options": {},
"realms": [
"<string>"
],
"show_as_button": true,
"strategy": "auth0"
}
],
"next": "<string>"
}クライアントの接続を取得
チェックポイントページネーションを使用して、指定したアプリケーションで有効になっているすべての接続を取得します。各接続について、結果に含めるフィールドまたは除外するフィールドの一覧を指定することもできます。
- このエンドポイントには
read:connectionsスコープと、read:clientsまたはread:client_summaryのいずれか 1 つが必要です。 - 注: このエンドポイントを初めて呼び出すときは、
fromパラメーターを省略してください。さらに結果がある場合は、レスポンスにnextの値が含まれます。これは後続の API 呼び出しで使用できます。レスポンスにnextが含まれなくなった時点で、それ以上の結果はありません。
GET
https://{tenantDomain}/api/v2
/
clients
/
{id}
/
connections
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Clients;
using System.Collections.Generic;
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.Clients.Connections.GetAsync(
id: "id",
request: new ConnectionsGetRequest {
Strategy = new List<ConnectionStrategyEnum>(){
ConnectionStrategyEnum.Ad,
}
,
From = "from",
Take = 1,
Fields = "fields",
IncludeFields = true
}
);
}
}package example
import (
context "context"
management "github.com/auth0/go-auth0/v3/management"
client "github.com/auth0/go-auth0/v3/management/client"
option "github.com/auth0/go-auth0/v3/management/option"
)
func do() {
mgmt, err := client.New(
"{YOUR_DOMAIN}",
option.WithToken(
"<token>",
),
)
if err != nil {
return
}
request := &management.ConnectionsGetRequest{
From: management.String(
"from",
),
Take: management.Int(
1,
),
Fields: management.String(
"fields",
),
IncludeFields: management.Bool(
true,
),
}
mgmt.Clients.Connections.Get(
context.TODO(),
"id",
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.clients.types.ConnectionsGetRequest;
import com.auth0.client.mgmt.types.ConnectionStrategyEnum;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.clients().connections().get(
"id",
ConnectionsGetRequest
.builder()
.strategy(
Arrays.asList(ConnectionStrategyEnum.AD)
)
.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\Clients\Connections\Requests\ConnectionsGetRequest;
use Auth0\SDK\API\Management\Types\ConnectionStrategyEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->clients->connections->get(
'id',
new ConnectionsGetRequest([
'strategy' => [
ConnectionStrategyEnum::Ad->value,
],
'from' => 'from',
'take' => 1,
'fields' => 'fields',
'includeFields' => true,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.clients.connections.get(
id="id",
strategy=[
"ad"
],
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.clients.connections.get(
id: "id",
strategy: ["ad"],
from: "from",
take: 1,
fields: "fields",
include_fields: true
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.clients.connections.get("id", {
from: "from",
take: 1,
fields: "fields",
includeFields: true,
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.clients.connections.get("id", {
from: "from",
take: 1,
fields: "fields",
includeFields: true,
});
}
main();
curl --request GET \
--url https://{tenantDomain}/api/v2/clients/{id}/connections \
--header 'Authorization: Bearer <token>'{
"connections": [
{
"authentication": {
"active": true
},
"connected_accounts": {
"active": true,
"allow_missing_user_id": true,
"cross_app_access": true
},
"cross_app_access_requesting_app": {
"active": true
},
"cross_app_access_resource_app": {},
"display_name": "<string>",
"id": "con_0000000000000001",
"is_domain_connection": true,
"metadata": {},
"name": "My connection",
"options": {},
"realms": [
"<string>"
],
"show_as_button": true,
"strategy": "auth0"
}
],
"next": "<string>"
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
パスパラメータ
有効な接続を取得する対象のクライアント ID。
クエリパラメータ
指定した strategy を持つ接続のみを取得するには、strategy を指定します
利用可能なオプション:
ad, adfs, amazon, apple, dropbox, bitbucket, auth0-oidc, auth0, baidu, bitly, box, custom, daccount, dwolla, email, evernote-sandbox, evernote, exact, facebook, fitbit, github, google-apps, google-oauth2, instagram, ip, line, linkedin, oauth1, oauth2, office365, oidc, okta, paypal, paypal-sandbox, pingfederate, planningcenter, salesforce-community, salesforce-sandbox, salesforce, samlp, sharepoint, shopify, shop, sms, soundcloud, thirtysevensignals, twitter, untappd, vkontakte, waad, weibo, windowslive, wordpress, yahoo, yandex, auth0-adldap 選択を開始する起点となる省略可能な ID。
Maximum string length:
10001 ページあたりの結果数。デフォルトは 50 です。
必須範囲:
1 <= x <= 100結果に含める、または除外する(include_fields に応じて)フィールドのカンマ区切りリスト。すべてのフィールドを取得する場合は空にします
Maximum string length:
1000指定したフィールドを結果に含める場合は true、含めない場合は false(デフォルトは true)
⌘I