Passer au contenu principal
GET
/
connections
/
{id}
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.connections.get("id", {
        fields: "fields",
        includeFields: true,
    });
}
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
  }
}

Autorisations

Authorization
string
header
requis

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

Paramètres de chemin

id
string
requis

The id of the connection to retrieve

Paramètres de requête

fields
string

A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields

Pattern: ^((name)|(display_name)|(strategy)|(options)|(id)|(provisioning_ticket_url)|(metadata)|(show_as_button)|(clients)|(authentication)|(connected_accounts)|(cross_app_access_requesting_app)|(cross_app_access_resource_app)|(enabled_clients))(,((name)|(display_name)|(strategy)|(options)|(id)|(provisioning_ticket_url)|(metadata)|(show_as_button)|(clients)|(authentication)|(connected_accounts)|(cross_app_access_requesting_app)|(cross_app_access_resource_app)|(enabled_clients)))*$
include_fields
boolean

true if the fields specified are to be included in the result, false otherwise (defaults to true)

Réponse

The connection was retrieved.

name
string
défaut: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
défaut:con_0000000000000001

The connection's identifier

strategy
string
défaut: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.