Appearance
SCIM 2.0 Provisioning
Automate user lifecycle management with SCIM 2.0. Connect your Identity Provider to automatically provision and deprovision users.
Overview
SCIM (System for Cross-domain Identity Management) allows your IdP to:
- Provision users when assigned to the GhostAI application
- Deprovision users when removed from the application
- Update user attributes (name, active status)
- Sync user data between your IdP and GhostAI
Supported Identity Providers
| Provider | Status |
|---|---|
| Okta | ✅ Supported |
| Azure AD / Entra ID | ✅ Supported |
| OneLogin | ✅ Supported |
| Any SCIM 2.0 compatible IdP | ✅ Supported |
Setup
Step 1: Generate a SCIM Token
- Open Admin Dashboard → Team → SCIM
- Click Generate Token
- Add a description (e.g., "Okta SCIM integration")
- Copy the token immediately — it is only shown once
WARNING
The SCIM bearer token is displayed only once when generated. Copy and store it securely before closing the dialog. If you lose the token, revoke it and generate a new one.
Step 2: Configure Your IdP
Use the following details to configure SCIM in your Identity Provider:
| Setting | Value |
|---|---|
| SCIM Base URL | The URL shown in Admin → Team → SCIM (this is the API base URL, e.g. https://api.your-domain.com/scim/v2). If your app and API use different hosts, use the API host so Okta/IdP "Test Credentials" can reach the endpoint. |
| Authentication | Bearer Token |
| Token | (the token from Step 1) |
Step 3: Enable Provisioning
In your IdP, enable:
- Create Users — Provision users when assigned
- Update User Attributes — Sync name and email changes
- Deactivate Users — Deprovision when removed
SCIM Endpoints
| Endpoint | Method | Description |
|---|---|---|
/scim/v2/Users | GET | List users (supports ?filter=userName eq "...") |
/scim/v2/Users | POST | Create (provision) a user |
/scim/v2/Users/{id} | GET | Get user details |
/scim/v2/Users/{id} | PATCH | Update user attributes |
/scim/v2/Users/{id} | DELETE | Deprovision a user |
Token Management
Viewing Tokens
SCIM shows all active and revoked tokens with:
- Description
- Created date
- Last used date
- Status (active/revoked)
Revoking Tokens
- Find the token in the list
- Click Revoke
- The token is immediately deactivated
TIP
Revoke and regenerate tokens periodically as a security best practice. Update your IdP configuration with the new token after regeneration.
Token Management API
bash
# Generate a SCIM token
curl -X POST https://api.ghostai.com/api/organizations/{org_id}/scim-tokens \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"description": "Okta SCIM integration"}'
# List active tokens
curl https://api.ghostai.com/api/organizations/{org_id}/scim-tokens \
-H "Authorization: Bearer YOUR_TOKEN"
# Revoke a token
curl -X DELETE https://api.ghostai.com/api/organizations/{org_id}/scim-tokens/{token_id} \
-H "Authorization: Bearer YOUR_TOKEN"Troubleshooting
"Unauthorized" or "Test Credentials" fails in Okta
- Use the API base URL: The SCIM Base URL must point to your API server (e.g.
https://api.ghostai.com/scim/v2), not the frontend app. The Admin → Team → SCIM tab shows the correct URL from server config. - Verify the SCIM Base URL is correct (include
/scim/v2). - Verify the bearer token is active (not revoked).
- Check that the token was copied correctly (no extra spaces).
Users Not Provisioning
- Verify SCIM is enabled in your IdP
- Check that the user is assigned to the GhostAI application in your IdP
- Verify the SCIM token has not expired or been revoked
Duplicate Users
SCIM uses email as the unique identifier. If a user already exists with the same email, the SCIM endpoint will link to the existing user rather than creating a duplicate.
Security
- SCIM tokens are hashed (SHA-256) before storage — the plaintext is never persisted
- All SCIM operations are recorded in the audit log
- Tokens can be revoked instantly from the Admin Dashboard
- Enterprise plan required for SCIM access