Identity Providers
Swarmd supports per-tenant SSO so your team can authenticate via your organisation’s existing identity provider. Once configured, users with a matching email domain are offered SSO as a login option alongside password authentication. The flow works in three stages:- Configure an identity provider — register your provider and associate it with one or more email domains.
- Login discovery — the frontend calls the discover endpoint with the user’s email. If the domain matches a configured provider, the user is redirected to SSO.
- Callback — after authenticating with the identity provider, the authorization code is exchanged for a Swarmd session. New users are automatically provisioned into the correct tenant.
You need the IDENTITY_PROVIDERS permission to manage identity providers. Users in the Tenant Administrator group have this by default. See User Management for details on permissions.
Supported Providers
All providers use OIDC under the hood. Swarmd derives all endpoint URLs automatically from the config you provide.
Microsoft Entra ID
Step 1: Register an Application in Entra ID
- Go to the Azure Portal and navigate to Microsoft Entra ID > App registrations > New registration.
- Set the Name to “Swarmd SSO”.
- Under Redirect URIs, select Web and leave it blank — you will get the exact URL from the Swarmd API response.
- Click Register.
- Go to Certificates & secrets > Client secrets > New client secret. Copy the Value immediately.
- To include groups in the token: go to Token configuration > Add groups claim and select Security groups.
Step 2: Create the Identity Provider in Swarmd
Step 3: Set the Redirect URI
Copy theredirectUri from the response and paste it into your Entra app registration under Redirect URIs.
Google Workspace
Step 1: Create OAuth Credentials
- Go to the Google Cloud Console and select your project.
- Navigate to APIs & Services > Credentials > Create Credentials > OAuth client ID.
- Select Web application, set the name to “Swarmd SSO”.
- Leave Authorized redirect URIs blank — you will get the URL from the Swarmd API response.
- Click Create and copy the Client ID and Client Secret.
Step 2: Create the Identity Provider in Swarmd
Step 3: Set the Redirect URI
Copy theredirectUri from the response and paste it into the Google Cloud Console under Authorized redirect URIs.
Okta
Step 1: Create an OIDC App Integration
- In the Okta Admin Console, go to Applications > Create App Integration.
- Select OIDC - OpenID Connect and Web Application, then click Next.
- Set the App name to “Swarmd SSO”.
- Leave the Sign-in redirect URIs blank — you will get the URL from the Swarmd API response.
- Under Assignments, assign the users or groups that should have access.
Step 2: Create the Identity Provider in Swarmd
Step 3: Set the Redirect URI
Copy theredirectUri from the response and paste it into Okta under Sign-in redirect URIs.
API Reference
Create Identity Provider
POST /v1/identity-providers
Microsoft Entra Config
Google Workspace Config
Okta Config
Required JWT Claims
Regardless of which provider you use, Swarmd expects the following claims in the JWT:Group Mappings
Group mappings let you automatically assign users to Swarmd groups based on their identity provider group membership. ThegroupMappings field maps external group names to Swarmd group UUIDs:
Keys are case-sensitive. Group membership is synced on every SSO login. Manually assigned groups are never removed by SSO sync.
Email Domain Rules
- Each domain can only be associated with one identity provider across the entire platform.
- Domains are normalised to lowercase. Maximum length is 253 characters.
- If a domain is already claimed by another provider, the request is rejected with
409 Conflict.
Login Discovery
ssoRedirectUrl.
SSO Callback
- New users are auto-provisioned into the tenant that owns the matching email domain.
- Existing password users are linked by email — no duplicate is created.
- Returning SSO users have group membership synced.
Managing Identity Providers
Updating
Only the fields you include are changed:Deleting
Disabling and Recovery
Disabling an IdP ("enabled": false) immediately stops SSO login for that domain.
If your identity provider goes down:
- The Tenant Administrator logs in via password
- Disables the identity provider
- All domain users can now log in via password (or request a password reset)
- Fix the IdP configuration, then re-enable
Next Steps
User Management
Create custom groups and manage permissions for SSO-provisioned users.
Monitoring & Audit
Track SSO login events and identity provider changes in the audit log.
