using Auth0.ManagementApi;
using System.Threading.Tasks;
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.Connections.CreateAsync(
new CreateConnectionRequestContent {
Name = "name",
Strategy = ConnectionIdentityProviderEnum.Ad
}
);
}
}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.CreateConnectionRequestContent{
Name: "name",
Strategy: management.ConnectionIdentityProviderEnumAd,
}
mgmt.Connections.Create(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.ConnectionIdentityProviderEnum;
import com.auth0.client.mgmt.types.CreateConnectionRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.connections().create(
CreateConnectionRequestContent
.builder()
.name("name")
.strategy(ConnectionIdentityProviderEnum.AD)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Connections\Requests\CreateConnectionRequestContent;
use Auth0\SDK\API\Management\Types\ConnectionIdentityProviderEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->connections->create(
new CreateConnectionRequestContent([
'name' => 'name',
'strategy' => ConnectionIdentityProviderEnum::Ad->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.connections.create(
name="name",
strategy="ad",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.connections.create(
name: "name",
strategy: "ad"
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.connections.create({
name: "name",
strategy: "ad",
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.connections.create({
name: "name",
strategy: "ad",
});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"display_name": "<string>",
"enabled_clients": [
"<string>"
],
"is_domain_connection": true,
"metadata": {},
"options": {
"api_enable_groups": true,
"api_enable_users": true,
"attributes": {
"email": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
},
"unique": true
},
"phone_number": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
}
},
"username": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {},
"validation": {
"allowed_types": {
"email": true,
"phone_number": true
},
"max_length": 64.5,
"min_length": 64.5
}
}
},
"authentication_methods": {
"email_otp": {
"enabled": true
},
"passkey": {
"enabled": true
},
"password": {
"enabled": true
},
"phone_otp": {
"enabled": true
}
},
"basic_profile": true,
"configuration": {},
"customScripts": {
"change_email": "<string>",
"change_password": "<string>",
"change_phone_number": "<string>",
"change_username": "<string>",
"create": "<string>",
"delete": "<string>",
"get_user": "<string>",
"login": "<string>",
"verify": "<string>"
},
"disable_self_service_change_password": true,
"discovery_url": "<string>",
"enable_script_context": true,
"enabledDatabaseCustomization": true,
"ext_admin": true,
"ext_agreed_terms": true,
"ext_assigned_plans": true,
"ext_groups": true,
"ext_is_suspended": true,
"ext_profile": true,
"gateway_authentication": {
"audience": "<string>",
"method": "<string>",
"secret": "<string>",
"secret_base64_encoded": true,
"subject": "<string>"
},
"id_token_session_expiry_supported": true,
"id_token_signed_response_algs": [],
"import_mode": true,
"non_persistent_attrs": [
"<string>"
],
"oidc_metadata": {
"acr_values_supported": [
"<string>"
],
"authorization_endpoint": "<string>",
"claim_types_supported": [
"<string>"
],
"claims_locales_supported": [
"<string>"
],
"claims_parameter_supported": true,
"claims_supported": [
"<string>"
],
"display_values_supported": [
"<string>"
],
"dpop_signing_alg_values_supported": [
"<string>"
],
"end_session_endpoint": "<string>",
"grant_types_supported": [
"<string>"
],
"id_token_encryption_alg_values_supported": [
"<string>"
],
"id_token_encryption_enc_values_supported": [
"<string>"
],
"id_token_signing_alg_values_supported": [
"<string>"
],
"issuer": "<string>",
"jwks_uri": "<string>",
"op_policy_uri": "<string>",
"op_tos_uri": "<string>",
"registration_endpoint": "<string>",
"request_object_encryption_alg_values_supported": [
"<string>"
],
"request_object_encryption_enc_values_supported": [
"<string>"
],
"request_object_signing_alg_values_supported": [
"<string>"
],
"request_parameter_supported": true,
"request_uri_parameter_supported": true,
"require_request_uri_registration": true,
"response_modes_supported": [
"<string>"
],
"response_types_supported": [
"<string>"
],
"scopes_supported": [
"<string>"
],
"service_documentation": "<string>",
"subject_types_supported": [
"<string>"
],
"token_endpoint": "<string>",
"token_endpoint_auth_methods_supported": [
"<string>"
],
"token_endpoint_auth_signing_alg_values_supported": [
"<string>"
],
"ui_locales_supported": [
"<string>"
],
"userinfo_encryption_alg_values_supported": [
"<string>"
],
"userinfo_encryption_enc_values_supported": [
"<string>"
],
"userinfo_endpoint": "<string>",
"userinfo_signing_alg_values_supported": [
"<string>"
]
},
"passkey_options": {
"local_enrollment_enabled": true,
"progressive_enrollment_enabled": true
},
"password_complexity_options": {
"min_length": 64
},
"password_dictionary": {
"enable": true,
"dictionary": [
"<string>"
]
},
"password_history": {
"enable": true,
"size": 12
},
"password_no_personal_info": {
"enable": true
},
"password_options": {
"complexity": {
"character_types": [],
"min_length": 36
},
"dictionary": {
"active": true,
"custom": [
"<string>"
]
},
"history": {
"active": true,
"size": 12
},
"profile_data": {
"active": true,
"blocked_fields": [
"<string>"
]
}
},
"precedence": [],
"set_user_root_attributes": "on_each_login",
"upstream_params": {},
"validation": {
"username": {
"max": 123,
"min": 2
}
}
},
"realms": [
"<string>"
],
"show_as_button": true
}
'{
"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>",
"enabled_clients": [
"<string>"
],
"id": "con_0000000000000001",
"is_domain_connection": true,
"metadata": {},
"name": "My connection",
"options": {},
"realms": [
"<string>"
],
"show_as_button": true,
"strategy": "auth0"
}接続を作成
body で受け取った JSON オブジェクトに基づいて、新しい接続を作成します。
注: 同じ名前の接続が最近削除されており、多数の関連ユーザーが存在していた場合、その削除処理がまだ進行中である可能性があります。削除が完了する前にその名前で新しい接続を作成すると、失敗したり予期しない結果が生じたりすることがあります。
using Auth0.ManagementApi;
using System.Threading.Tasks;
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.Connections.CreateAsync(
new CreateConnectionRequestContent {
Name = "name",
Strategy = ConnectionIdentityProviderEnum.Ad
}
);
}
}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.CreateConnectionRequestContent{
Name: "name",
Strategy: management.ConnectionIdentityProviderEnumAd,
}
mgmt.Connections.Create(
context.TODO(),
request,
)
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.ConnectionIdentityProviderEnum;
import com.auth0.client.mgmt.types.CreateConnectionRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.connections().create(
CreateConnectionRequestContent
.builder()
.name("name")
.strategy(ConnectionIdentityProviderEnum.AD)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Connections\Requests\CreateConnectionRequestContent;
use Auth0\SDK\API\Management\Types\ConnectionIdentityProviderEnum;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->connections->create(
new CreateConnectionRequestContent([
'name' => 'name',
'strategy' => ConnectionIdentityProviderEnum::Ad->value,
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.connections.create(
name="name",
strategy="ad",
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.connections.create(
name: "name",
strategy: "ad"
)
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.connections.create({
name: "name",
strategy: "ad",
});
}
main();
import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
domain: "{YOUR_DOMAIN}",
token: "<token>",
});
await client.connections.create({
name: "name",
strategy: "ad",
});
}
main();
curl --request POST \
--url https://{tenantDomain}/api/v2/connections \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"display_name": "<string>",
"enabled_clients": [
"<string>"
],
"is_domain_connection": true,
"metadata": {},
"options": {
"api_enable_groups": true,
"api_enable_users": true,
"attributes": {
"email": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
},
"unique": true
},
"phone_number": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {
"verification": {
"active": true
}
}
},
"username": {
"identifier": {
"active": true
},
"profile_required": true,
"signup": {},
"validation": {
"allowed_types": {
"email": true,
"phone_number": true
},
"max_length": 64.5,
"min_length": 64.5
}
}
},
"authentication_methods": {
"email_otp": {
"enabled": true
},
"passkey": {
"enabled": true
},
"password": {
"enabled": true
},
"phone_otp": {
"enabled": true
}
},
"basic_profile": true,
"configuration": {},
"customScripts": {
"change_email": "<string>",
"change_password": "<string>",
"change_phone_number": "<string>",
"change_username": "<string>",
"create": "<string>",
"delete": "<string>",
"get_user": "<string>",
"login": "<string>",
"verify": "<string>"
},
"disable_self_service_change_password": true,
"discovery_url": "<string>",
"enable_script_context": true,
"enabledDatabaseCustomization": true,
"ext_admin": true,
"ext_agreed_terms": true,
"ext_assigned_plans": true,
"ext_groups": true,
"ext_is_suspended": true,
"ext_profile": true,
"gateway_authentication": {
"audience": "<string>",
"method": "<string>",
"secret": "<string>",
"secret_base64_encoded": true,
"subject": "<string>"
},
"id_token_session_expiry_supported": true,
"id_token_signed_response_algs": [],
"import_mode": true,
"non_persistent_attrs": [
"<string>"
],
"oidc_metadata": {
"acr_values_supported": [
"<string>"
],
"authorization_endpoint": "<string>",
"claim_types_supported": [
"<string>"
],
"claims_locales_supported": [
"<string>"
],
"claims_parameter_supported": true,
"claims_supported": [
"<string>"
],
"display_values_supported": [
"<string>"
],
"dpop_signing_alg_values_supported": [
"<string>"
],
"end_session_endpoint": "<string>",
"grant_types_supported": [
"<string>"
],
"id_token_encryption_alg_values_supported": [
"<string>"
],
"id_token_encryption_enc_values_supported": [
"<string>"
],
"id_token_signing_alg_values_supported": [
"<string>"
],
"issuer": "<string>",
"jwks_uri": "<string>",
"op_policy_uri": "<string>",
"op_tos_uri": "<string>",
"registration_endpoint": "<string>",
"request_object_encryption_alg_values_supported": [
"<string>"
],
"request_object_encryption_enc_values_supported": [
"<string>"
],
"request_object_signing_alg_values_supported": [
"<string>"
],
"request_parameter_supported": true,
"request_uri_parameter_supported": true,
"require_request_uri_registration": true,
"response_modes_supported": [
"<string>"
],
"response_types_supported": [
"<string>"
],
"scopes_supported": [
"<string>"
],
"service_documentation": "<string>",
"subject_types_supported": [
"<string>"
],
"token_endpoint": "<string>",
"token_endpoint_auth_methods_supported": [
"<string>"
],
"token_endpoint_auth_signing_alg_values_supported": [
"<string>"
],
"ui_locales_supported": [
"<string>"
],
"userinfo_encryption_alg_values_supported": [
"<string>"
],
"userinfo_encryption_enc_values_supported": [
"<string>"
],
"userinfo_endpoint": "<string>",
"userinfo_signing_alg_values_supported": [
"<string>"
]
},
"passkey_options": {
"local_enrollment_enabled": true,
"progressive_enrollment_enabled": true
},
"password_complexity_options": {
"min_length": 64
},
"password_dictionary": {
"enable": true,
"dictionary": [
"<string>"
]
},
"password_history": {
"enable": true,
"size": 12
},
"password_no_personal_info": {
"enable": true
},
"password_options": {
"complexity": {
"character_types": [],
"min_length": 36
},
"dictionary": {
"active": true,
"custom": [
"<string>"
]
},
"history": {
"active": true,
"size": 12
},
"profile_data": {
"active": true,
"blocked_fields": [
"<string>"
]
}
},
"precedence": [],
"set_user_root_attributes": "on_each_login",
"upstream_params": {},
"validation": {
"username": {
"max": 123,
"min": 2
}
}
},
"realms": [
"<string>"
],
"show_as_button": true
}
'{
"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>",
"enabled_clients": [
"<string>"
],
"id": "con_0000000000000001",
"is_domain_connection": true,
"metadata": {},
"name": "My connection",
"options": {},
"realms": [
"<string>"
],
"show_as_button": true,
"strategy": "auth0"
}承認
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ボディ
接続の名前。先頭と末尾は英数字である必要があり、使用できるのは英数字と '-' のみです。最大長は 128 です
128^[a-zA-Z0-9](-[a-zA-Z0-9]|[a-zA-Z0-9])*$接続のアイデンティティプロバイダー識別子
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 ログイン時の認証に使用する接続の目的を設定します。
Show child attributes
Show child attributes
接続済みアカウントおよび Token Vault で使用する接続の用途を設定します。
Show child attributes
Show child attributes
Cross App Access のリクエスト元アプリケーションとして使用する接続を設定します。
Show child attributes
Show child attributes
この接続に適用される Cross App Access - Resource App の設定。
Show child attributes
Show child attributes
新しい Universal Login エクスペリエンスで使用される接続名
128このプロパティの使用は推奨されません。指定したクライアント群に対して接続を有効にするには、PATCH /v2/connections/{id}/clients endpoint を使用してください。
接続を有効にする対象のクライアントの id。
true の場合、サードパーティアプリケーションが使用できるよう、ドメインレベルの接続に昇格されます。false の場合、接続は昇格されないため、接続が有効になっているファーストパーティアプリケーションのみが使用できます。(既定値は false です。)
接続に関連付けられたメタデータ。文字列値(最大255文字)を持つオブジェクト形式です。メタデータのプロパティは最大10個まで指定できます。
Show child attributes
Show child attributes
接続のオプション(接続 strategy によって異なります)
Show child attributes
Show child attributes
この接続が使用されるレルム(例: メールドメイン)を定義します。array が空、またはこのプロパティが指定されていない場合は、接続名がレルムとして追加されます。
この接続が属するレルム
ログインページにこの接続のボタンを表示できるようにします(新しいエクスペリエンスのみ)。false の場合は、HRD でのみ使用できます。(既定値は false です。)
レスポンス
接続が作成されました。
ログイン時の認証に使用する接続の目的を設定します。
Show child attributes
Show child attributes
接続済みアカウントおよび Token Vault で使用する接続の用途を設定します。
Show child attributes
Show child attributes
Cross App Access のリクエスト元アプリケーションとして使用する接続を設定します。
Show child attributes
Show child attributes
この接続に適用される Cross App Access - Resource App の設定。
Show child attributes
Show child attributes
ログイン画面で使用される接続名
非推奨のプロパティです。接続が有効になっているクライアントの ID を取得するには、GET /connections/:id/clients endpoint を使用してください
クライアント ID
接続の識別子
接続がドメインレベルである場合は true
接続に関連付けられたメタデータ。文字列値(最大255文字)を持つオブジェクト形式です。メタデータのプロパティは最大10個まで指定できます。
Show child attributes
Show child attributes
接続名
レスポンスに options を含めるには、read:connections_options scope が含まれている必要があります
この接続が使用されるレルム(例: メールドメイン)を定義します。array が空、またはこのプロパティが指定されていない場合は、接続名がレルムとして追加されます。
この接続が属するレルム
ログインページにこの接続のボタンを表示するかどうかを設定します(新しいエクスペリエンスのみ)。false の場合は、HRD でのみ使用できます。
アイデンティティプロバイダーに関連付けられた接続の種類