> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended**:
> ```bash
> npx @scalekit-inc/cli setup
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for 40+ agents.
> Features: full-stack-auth, agent-auth, mcp-auth, modular-sso, modular-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# SSO connections

Configure enterprise SSO connections
<div class="sdk-client-page">

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
<div class="sdk-method-section">
  
    
      

      Retrieves complete configuration and status details for a specific SSO connection.

      
        Organization ID.
      
      
        The connection identifier to retrieve (format: "conn_...")
      
      
        The connection.
      

```typescript wrap showLineNumbers=false
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');
```

    
  
</div>

### listConnectionsByDomain
<div class="sdk-method-section">
  
    
      

      Lists all SSO connections associated with a specific email domain.

      
        The email domain to search for (e.g., "acme.com")
      
      
        Paginated connections.
      

```typescript wrap showLineNumbers=false
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);
}
```

    
  
</div>

### listConnections
<div class="sdk-method-section">
  
    
      

      Lists all SSO connections configured for an organization.

      
        The organization ID
      
      
        Paginated connections.
      

```typescript wrap showLineNumbers=false
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'}`);
});
```

    
  
</div>

### listAppConnections
<div class="sdk-method-section">
  
    
      

      Lists app-level connections configured for the account (not scoped to an organization).

      
        Required or common fields: `pageSize`, `pageToken`, `provider`.
      
      
        Paginated connections.
      

    
  
</div>

### enableConnection
<div class="sdk-method-section">
  
    
      

      Enables an SSO connection for an organization.

      
        The organization ID
      
      
        The connection ID to enable
      
      
        Response with updated connection status
      

```typescript wrap showLineNumbers=false
const response = await scalekit.connection.enableConnection(
  'org_123456',
  'conn_abc123'
);

console.log('Connection enabled:', response.connection.enabled);
```

    
  
</div>

### disableConnection
<div class="sdk-method-section">
  
    
      

      Disables an SSO connection for an organization.

      
        The organization ID
      
      
        The connection ID to disable
      
      
        Response with updated connection status
      

```typescript wrap showLineNumbers=false
const response = await scalekit.connection.disableConnection(
  'org_123456',
  'conn_abc123'
);

console.log('Connection disabled:', !response.connection.enabled);
```

    
  
</div>

</div>


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
