Docs

getSamlConnection()

Retrieves a SamlConnection by its ID.

function getSamlConnection(samlConnectionId: string): Promise<SamlConnection>
  • Name
    samlConnectionId
    Type
    string
    Description

    The ID of the SAML connection to retrieve.

const samlConnectionId = 'samlc_123'

const response = await clerkClient.samlConnections.getSamlConnection(samlConnectionId)

console.log(response)
/*
{
  object: 'saml_connection',
  id: 'samlc_123',
  name: 'test-okta',
  domain: 'clerk.dev',
  idp_entity_id: 'http://www.okta.com/exk...',
  idp_sso_url: 'https://trial-000000.okta.com/app/trial-000000_clerkdocstest_1/exk.../sso/saml',
  idp_certificate: 'MII...',
  idp_metadata_url: 'https://trial-000000.okta.com/app/exk.../sso/saml/metadata',
  idp_metadata: null,
  acs_url: 'https://prepared-phoenix-00.clerk.accounts.dev/v1/saml/acs/samlc_123',
  sp_entity_id: 'https://prepared-phoenix-00.clerk.accounts.dev/saml/samlc_123',
  sp_metadata_url: 'https://prepared-phoenix-00.clerk.accounts.dev/v1/saml/metadata/samlc_123.xml',
  attribute_mapping: { user_id: '', email_address: '', first_name: '', last_name: '' },
  active: false,
  provider: 'saml_okta',
  user_count: 0,
  sync_user_attributes: true,
  allow_subdomains: false,
  allow_idp_initiated: false,
  created_at: 1720032705432,
  updated_at: 1720032705432
}
*/

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint GET/saml_connections/{saml_connection_id}. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on