SSO connections
Configure enterprise SSO connections
Use the connection client to configure enterprise SSO (SAML/OIDC) for an organization.
Enable SSO after the organization exists: create a connection, complete IdP setup, and test sign-in for that org.
getConnection
Section titled “getConnection”#asyncgetConnection
Retrieves complete configuration and status details for a specific SSO connection.
Organization ID.
The connection identifier to retrieve (format: “conn_…”)
The connection.
const response = await scalekit.connection.getConnection( 'org_123456', 'conn_abc123');
const conn = response.connection;console.log('Provider:', conn.provider);console.log('Type:', conn.type);console.log('Status:', conn.enabled ? 'Enabled' : 'Disabled');listConnectionsByDomain
Section titled “listConnectionsByDomain”#asynclistConnectionsByDomain
Lists all SSO connections associated with a specific email domain.
The email domain to search for (e.g., “acme.com”)
Paginated connections.
const response = await scalekit.connection.listConnectionsByDomain('acme.com');
if (response.connections.length > 0) { console.log('SSO available for domain acme.com'); const connection = response.connections[0]; console.log('Organization:', connection.organizationId);}listConnections
Section titled “listConnections”#asynclistConnections
Lists all SSO connections configured for an organization.
The organization ID
Paginated connections.
const response = await scalekit.connection.listConnections('org_123456');
console.log(`Found ${response.connections.length} connections`);response.connections.forEach(conn => { console.log(`- ${conn.provider} (${conn.type}): ${conn.enabled ? 'Enabled' : 'Disabled'}`);});listAppConnections
Section titled “listAppConnections”#asynclistAppConnections
Lists app-level connections configured for the account (not scoped to an organization).
Required or common fields: pageSize, pageToken, provider.
Paginated connections.
enableConnection
Section titled “enableConnection”#asyncenableConnection
Enables an SSO connection for an organization.
The organization ID
The connection ID to enable
Response with updated connection status
const response = await scalekit.connection.enableConnection( 'org_123456', 'conn_abc123');
console.log('Connection enabled:', response.connection.enabled);disableConnection
Section titled “disableConnection”#asyncdisableConnection
Disables an SSO connection for an organization.
The organization ID
The connection ID to disable
Response with updated connection status
const response = await scalekit.connection.disableConnection( 'org_123456', 'conn_abc123');
console.log('Connection disabled:', !response.connection.enabled);