āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/clerk/clerk-docs/reference/backend/saml-connections/create-saml-connection ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
createSamlConnection()'
description: Use Clerk's JS Backend SDK to create a SAML connection.
sdk: js-backendCreates a new SamlConnection.
function createSamlConnection(params: CreateSamlConnectionParams): Promise<SamlConnection>
CreateSamlConnectionParamsThe name to use as a label for this SAML Connection.
provider'saml_custom' | 'saml_okta' | 'saml_google' | 'saml_microsoft'The Identity Provider (IdP) provider of the connection.
domainstringThe domain of your organization. Sign in flows using an email with this domain will use this SAML Connection. For example: 'clerk.dev'
organizationId?stringThe ID of the organization to which users of this SAML Connection will be added
idpEntityId?stringThe Entity ID as provided by the Identity Provider (IdP).
idpSsoUrl?stringThe Single-Sign On URL as provided by the Identity Provider (IdP).
idpCertificate?stringThe X.509 certificate as provided by the Identity Provider (IdP).
idpMetadataUrl?stringThe URL which serves the Identity Provider (IdP) metadata. If present, it takes priority over the corresponding individual properties.
idpMetadata?stringThe XML content of the Identity Provider (IdP) metadata file. If present, it takes priority over the corresponding individual properties.
attributeMapping?{ emailAddress?: string, firstName?: string, lastName?: string, userId?: string }The attribute mapping for the SAML connection. </Properties>
const response = await clerkClient.samlConnections.createSamlConnection({
name: 'test-okta',
provider: 'saml_okta',
domain: 'clerk.dev',
idpMetadataUrl: 'https://trial-000000.okta.com/app/exk...',
attributeMapping: {
emailAddress: 'user.email',
firstName: 'user.firstName',
lastName: 'user.lastName',
},
})
This method in the SDK is a wrapper around the BAPI endpoint POST/saml_connections. See the BAPI reference{{ target: '_blank' }} for more information.
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā