メインコンテンツへスキップ
POST
/
connections
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.connections.create({
        name: "name",
        strategy: "ad",
    });
}
main();
{
  "name": "My connection",
  "display_name": "<string>",
  "options": {},
  "id": "con_0000000000000001",
  "strategy": "auth0",
  "realms": [
    "<string>"
  ],
  "enabled_clients": [
    "<string>"
  ],
  "is_domain_connection": true,
  "show_as_button": true,
  "metadata": {},
  "authentication": {
    "active": true
  },
  "connected_accounts": {
    "active": true,
    "cross_app_access": true
  }
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

ボディ

name
string
必須

The name of the connection. Must start and end with an alphanumeric character and can only contain alphanumeric characters and '-'. Max length 128

Maximum string length: 128
Pattern: ^[a-zA-Z0-9](-[a-zA-Z0-9]|[a-zA-Z0-9])*$
strategy
enum<string>
必須

The identity provider identifier for the connection

利用可能なオプション:
ad,
adfs,
amazon,
apple,
dropbox,
bitbucket,
aol,
auth0-oidc,
auth0,
baidu,
bitly,
box,
custom,
daccount,
dwolla,
email,
evernote-sandbox,
evernote,
exact,
facebook,
fitbit,
flickr,
github,
google-apps,
google-oauth2,
instagram,
ip,
line,
linkedin,
miicard,
oauth1,
oauth2,
office365,
oidc,
okta,
paypal,
paypal-sandbox,
pingfederate,
planningcenter,
renren,
salesforce-community,
salesforce-sandbox,
salesforce,
samlp,
sharepoint,
shopify,
shop,
sms,
soundcloud,
thecity-sandbox,
thecity,
thirtysevensignals,
twitter,
untappd,
vkontakte,
waad,
weibo,
windowslive,
wordpress,
yahoo,
yammer,
yandex
display_name
string

Connection name used in the new universal login experience

Maximum string length: 128
options
object

The connection's options (depend on the connection strategy)

enabled_clients
string<client-id>[]

DEPRECATED property. Use the PATCH /v2/connections/{id}/clients endpoint to enable the connection for a set of clients.

The id of the client to for which the connection is to be enabled.

is_domain_connection
boolean

true promotes to a domain-level connection so that third-party applications can use it. false does not promote the connection, so only first-party applications with the connection enabled can use it. (Defaults to false.)

show_as_button
boolean

Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD. (Defaults to false.)

realms
string<connection-realm>[]

Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

The realm where this connection belongs

metadata
object

Metadata associated with the connection in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed.

authentication
object

Configure the purpose of a connection to be used for authentication during login.

connected_accounts
object

Configure the purpose of a connection to be used for connected accounts and Token Vault.

レスポンス

The connection was created.

name
string
デフォルト:My connection

The name of the connection

display_name
string

Connection name used in login screen

options
object

In order to return options in the response, the read:connections_options scope must be present

id
string
デフォルト:con_0000000000000001

The connection's identifier

strategy
string
デフォルト:auth0

The type of the connection, related to the identity provider

realms
string<connection-realm>[]

Defines the realms for which the connection will be used (ie: email domains). If the array is empty or the property is not specified, the connection name will be added as realm.

The realm where this connection belongs

enabled_clients
string[]

DEPRECATED property. Use the GET /connections/:id/clients endpoint to get the ids of the clients for which the connection is enabled

The client id

is_domain_connection
boolean

True if the connection is domain level

show_as_button
boolean

Enables showing a button for the connection in the login page (new experience only). If false, it will be usable only by HRD.

metadata
object

Metadata associated with the connection in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed.

authentication
object

Configure the purpose of a connection to be used for authentication during login.

connected_accounts
object

Configure the purpose of a connection to be used for connected accounts and Token Vault.