Toktra supports enterprise SSO via SAML 2.0 and automated user provisioning via SCIM 2.0. This guide walks through configuring your identity provider, testing the connection, and understanding what gets synced.Documentation Index
Fetch the complete documentation index at: https://docs.toktra.dev/llms.txt
Use this file to discover all available pages before exploring further.
Supported identity providers
- Okta
- Azure AD
- Google Workspace
Use the SAML 2.0 app integration in the Okta Admin Console. Okta also supports SCIM provisioning via the Toktra SCIM endpoint.
SAML 2.0 SSO setup
Step 1: Get your SP metadata
Toktra acts as the SAML Service Provider (SP). Retrieve the SP metadata XML to configure your IdP:| Endpoint | URL |
|---|---|
| SP Metadata URL | https://api.toktra.io/v1/sso/metadata?org_id=<org_id> |
| ACS (Assertion Consumer Service) URL | https://api.toktra.io/v1/sso/acs?org_id=<org_id> |
| SP-initiated login | https://api.toktra.io/v1/sso/login?org_id=<org_id> |
| Single Logout (SLO) | https://api.toktra.io/v1/sso/logout?org_id=<org_id> |
Step 2: Configure your IdP
Create a SAML app in your IdP
In Okta: go to Applications → Create App Integration → SAML 2.0.
In Azure AD: go to Enterprise Applications → New application → Create your own application → Integrate any other application.
In Google Workspace: go to Apps → Web and mobile apps → Add app → Add custom SAML app.
Upload SP metadata or enter values manually
If your IdP supports metadata upload, paste the URL from the step above or upload the downloaded XML.If you must enter values manually, use:
- ACS URL:
https://api.toktra.io/v1/sso/acs?org_id=<org_id> - Entity ID / Audience:
https://api.toktra.io(or the value in the SP metadataentityIDattribute) - Name ID format:
urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
Map attributes
Toktra requires the following attributes in the SAML assertion:
| Attribute | IdP claim | Notes |
|---|---|---|
email | User email | Required. Used as the user’s primary identifier. |
firstName | Given name | Optional but recommended. |
lastName | Family name | Optional but recommended. |
department | Department | Optional. Used for budget scoping. |
Step 3: Upload IdP metadata to Toktra
CallPOST /v1/sso/config with the IdP metadata:
Step 4: Test the SP-initiated login flow
Open the login URL in a browser
Visit
https://api.toktra.io/v1/sso/login?org_id=<org_id>&relay_state=/. The response contains a redirect_url — open it to be redirected to your IdP’s login page.Authenticate with your IdP credentials
Complete the IdP login. The IdP posts a
SAMLResponse to the Toktra ACS endpoint.SP-initiated login is the recommended flow. IdP-initiated login (where the user clicks a tile in the IdP portal) is also supported but the
relay_state will default to /.SCIM 2.0 provisioning
SCIM automates user and group lifecycle management: when you add, update, or deactivate a user in your IdP, the change is reflected in Toktra automatically. Toktra’s SCIM 2.0 endpoint is fully RFC 7643/7644 compliant and supports the following operations:| Resource | Supported operations |
|---|---|
| Users | Create, Read, Update (PUT/PATCH), Delete |
| Groups | Create, Read |
Step 1: Get a SCIM Bearer token
Generate a SCIM Bearer token from the Toktra dashboard:- Go to Settings → SSO / SCIM (
SSOConfigPageat/settings/sso). - Click Generate SCIM Token.
- Copy the token — it will not be shown again.
Step 2: Configure SCIM in your IdP
- Okta
- Azure AD
In the Okta app you created for SAML, go to Provisioning → Configure API Integration:
- Base URL:
https://api.toktra.io/v1/scim/v2 - API Token: paste the Bearer token from step 1
- Click Test API Credentials to verify the connection.
- Create Users
- Update User Attributes
- Deactivate Users
What SCIM syncs
| What | How |
|---|---|
| User creation | When you assign the Toktra app to a user in your IdP, SCIM creates the user in Toktra. |
| User updates | Profile changes (name, email, department) in the IdP are synced to Toktra. |
| User deactivation | Deactivating a user in the IdP sets active: false in Toktra. Combined with the Okta user.lifecycle.deactivate webhook, this also triggers the lockout pipeline. |
| Groups / departments | SCIM Groups map to Toktra departments, enabling department-level budget enforcement to work automatically as your org chart changes. |
Step 3: Test the connection
After saving the SCIM configuration in your IdP, trigger a test provisioning event:- Assign a test user to the Toktra app in your IdP.
- Verify the user appears in Toktra under Users.
- Update the test user’s display name in the IdP and confirm the change syncs within the IdP’s provisioning interval (typically 40 minutes for Okta; near-real-time for Azure AD with on-demand provisioning).
Rotating credentials
To rotate the SCIM Bearer token, generate a new one from Settings → SSO / SCIM and update the token in your IdP immediately. The old token is invalidated as soon as the new one is generated. To rotate the SAML signing certificate, update the SP certificate in both Toktra (SAML_CERT_PATH / SAML_KEY_PATH) and the IdP app configuration. SAML certificate rotation requires a brief maintenance window to keep both sides in sync.