> **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/)

---

# Organizations

Manage your customer organizations
<div class="sdk-client-page">

Use `scalekit_client.organization` to create and manage customer tenants (organizations) in your Scalekit application.

Start here when onboarding a new customer: create an organization, set external IDs and branding, then add users and SSO for that org.

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

      Method to list organizations

      
        Results per page.
      
      
        Optional. page token for org list fetch
      
      
        list of organizations
      

```python wrap showLineNumbers=false
response = scalekit_client.organization.list_organizations(
    page_size=50,
    page_token='next_page_token'
)

for org in response[0].organizations:
    print(f"Organization: {org.display_name}")
```

    
  
</div>

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

      Method to create organization based on given data

      
        Create Organization obj with details for org creation
      
      
        Create Organization Response
      

```python wrap showLineNumbers=false
from scalekit.v1.organizations.organizations_pb2 import CreateOrganization

org = CreateOrganization()
org.display_name = "Acme Corp"
org.external_id = "acme_123"

response = scalekit_client.organization.create_organization(org)
print(f"Created organization: {response[0].organization.id}")
```

    
  
</div>

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

      Method to get organization based on given org id

      
        Organization id
      
      
        Get Organization Response
      

```python wrap showLineNumbers=false
response = scalekit_client.organization.get_organization('org_123456')
organization = response[0].organization
print(f"Organization: {organization.display_name}")
```

    
  
</div>

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

      Method to get organization based on given org id

      
        External id to fetch org details
      
      
        Get Organization Response
      

```python wrap showLineNumbers=false
response = scalekit_client.organization.get_organization_by_external_id('acme_123')
organization = response[0].organization
```

    
  
</div>

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

      Method to update organization based on given data

      
        Organization id to update
      
      
        params for update organization operation
      
      
        Update Organization Response
      

```python wrap showLineNumbers=false
from scalekit.v1.organizations.organizations_pb2 import UpdateOrganization

org = UpdateOrganization()
org.display_name = "Acme Corporation"

response = scalekit_client.organization.update_organization('org_123456', org)
```

    
  
</div>

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

      Method to delete organization based on given org id

      
        Organization id
      
      
        Empty on success.
      

```python wrap showLineNumbers=false
scalekit_client.organization.delete_organization('org_123456')
```

    
  
</div>

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

      Method to generate customer portal link

      
        Organization id to fetch portal link for
      
      
        Optional. Feature list to generate portal link for
      
      
        Authorization link.
      

```python wrap showLineNumbers=false
portal_link = scalekit_client.organization.generate_portal_link('org_123456')
print(f"Portal Link: {portal_link}")
```

    
  
</div>

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

      Method to update organization based on external id

      
        External id to update org
      
      
        params for update organization operation
      
      
        Update Organization Response
      

    
  
</div>

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

      Method to update organization settings

      
        Organization id for org update
      
      
        Organization settings
      
      
        The updated resource.
      

    
  
</div>

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

      Upsert organization user management settings like maximum allowed users.

      
        Organization id for update
      
      
        Optional. Maximum allowed users (None to clear)
      
      
        None.
      

    
  
</div>

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

      Get the session policy for an organization.

      
        Organization id
      
      
        The response payload for this operation.
      

    
  
</div>

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

      Runs `update_organization_session_policy` and returns the result.

      
        Organization ID.
      
      
        Policy source.
      
      
        Absolute session timeout.
      
      
        Timeout unit.
      
      
        Idle session timeout enabled.
      
      
        Idle session timeout.
      
      
        Timeout unit.
      
      
        The updated resource.
      

    
  
</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 |
