Connect Microsoft Entra ID or Okta over SCIM
Let Microsoft Entra ID or Okta create, update, deactivate and remove the members of one organization, and keep its groups in step.
Developers and identity administrators who run Claviger and manage an Entra ID or Okta directory.
Without SCIM, someone must add and remove each member by hand. With SCIM, a change in the directory reaches the organization on the next sync. Deactivation takes access away at once.
What you will do, in one sentence
Create a SCIM token for the organization, give the tenant URL and token to the identity provider, and map groups to roles.
Screens are captured from a seeded test system. Every name, address and number on the screens is invented. Prepared 15 November 2026.
1. What you need
Claviger speaks SCIM 2.0 (RFC 7643 and 7644). One token serves one organization. Google Workspace is not a general SCIM client for custom apps, so this guide does not cover it.
| Item | Value |
|---|---|
| Tenant (base) URL | https://auth.example.org/scim/v2 |
| Secret token | scim_<prefix>_<secret>, one per organization |
With no token created, /scim/v2 answers 401 to every request and no data is touched.
The engine runbook says SCIM is covered by Go tests that replay the requests Entra and Okta are documented to send. It has not been run against a real identity provider yet. Run the checks in the runbook on a throw-away instance first.
2. Create a token
An owner or admin of the organization creates the token. Use the hosted page /orgs/<slug> under SCIM provisioning, or the admin UI under Organizations. Or use the API:
curl -X POST https://auth.example.org/api/orgs/$ORG_ID/scim-tokens \
-H "Authorization: $TOKEN" -H "Content-Type: application/json" \
-d '{"name": "Entra provisioning"}'
The response is the only time the token is shown. Copy it now.
- The token belongs to one organization. It cannot call
/api, run a collection rule or see another organization. - An organization can hold up to 10 live tokens. Create the new token first, then revoke the old one with
DELETE /api/orgs/{id}/scim-tokens/{token}. - A wrong, revoked or expired token gets
401. More than 30 failed tries a minute from one address get429. A valid token on an archived organization gets403.
Check the token before you involve the provider:
curl -s -H "Authorization: Bearer $SCIM_TOKEN" https://auth.example.org/scim/v2/ServiceProviderConfig
3. Set roles and groups
GET /api/orgs/{id}/scim-settings and PUT on the same route hold three settings.
| Setting | Meaning |
|---|---|
defaultRole | The role of new users: admin, member or viewer. The default is member. |
groupRoles | Maps a group name to a role, for example "Choir Leaders": "admin". |
deactivationBans | When on, deactivation also bans the account, if the person belongs to no other organization. |
A SCIM group never creates an organization. Every member of a group gets a tag with the group name. An unmapped group still tags its members. The highest mapped role of a person's groups wins.
The default role and the group mappings cannot be owner. SCIM can suspend or remove an owner, but never the last one.
Create the users before you push the groups. Group members must already be users of the organization.
4. Set up the provider
Microsoft Entra ID
-
In the Entra admin center, open Enterprise applications, then New application, then Create your own application. Choose the non-gallery option.
-
Open Provisioning. Set the mode to Automatic.
-
Enter the tenant URL and the secret token. Select Test Connection.
-
Under Mappings, open Provision Microsoft Entra ID Users. Keep these mappings and remove the rest:
Entra attribute customappsso attribute userPrincipalName(ormail)userName(matching, precedence 1)Switch([IsSoftDeleted], , "False", "True", "True", "False")activedisplayNamedisplayNamegivenName,surnamename.givenName,name.familyNameobjectIdexternalId -
Open Provision Microsoft Entra ID Groups. Map
displayName,membersandobjectId(toexternalId). -
Assign the users and groups, then switch provisioning on. A cycle runs about every 40 minutes. Use Provision on demand to test.
userName must be a real email address. If the sign-in name is not the person's mailbox, map mail to userName.
Okta
- Open Applications, then Browse App Catalog. Add "SCIM 2.0 Test App (Header Auth)", or create a SCIM 2.0 app integration with header auth.
- Under Provisioning, Integration, set the SCIM connector base URL. Set the unique identifier field to
userName. Tick Push New Users, Push Profile Updates and Push Groups. - Set Authentication Mode to HTTP Header. Paste the token. Select Test Connector Configuration.
- Under To App, enable Create Users, Update User Attributes and Deactivate Users. The default mappings are enough.
- Under Push Groups, add the groups to push.
5. What happens to a user
| Provider action | Result in Claviger |
|---|---|
| Create a user | An account and a membership with source = scim. The account is created verified, with a random password nobody knows. No welcome mail is sent. |
| Create a user whose email has a verified account | The account is linked. Its password and profile are left alone. |
| Create a user whose email has an unverified account | 409. The person must verify the address first. |
Set active to false | The membership is suspended and access ends at once. |
| Delete a user | The membership is removed. The account stays. |
| Change an email or name | Applied only for accounts this organization's SCIM created and that belong to no other organization. |
People sign in with a passkey, OIDC, an emailed code or a password reset. SCIM never sets or accepts a password.
By default only the organization membership is suspended. The person can still sign in to other organizations. Turn on deactivationBans to also block the account when it belongs to no other organization.
Every SCIM write appears in the audit log with actorType: "scim" and meta.orgId.
6. What is not supported
/Bulk,/Me,/.search, ETags and sorting.- The enterprise user extension. Claviger accepts it and ignores it.
password. It is never accepted and never returned.- Filters other than
attribute eq valueterms joined withand. Anything else is400withscimType: invalidFilter. - Outbound SCIM. Claviger is the target, never the source.
7. Quick reference card
Connect a provider
- Create a token on the organization page.
- Enter
https://auth.example.org/scim/v2and the token. - Map
userNameto an email address. - Set
defaultRoleandgroupRoles.
Fix an error
401: wrong, revoked or expired token.409 uniqueness: the account exists and is not verified.400 mutability: the account is shared or SCIM did not create it.429: wait a minute.
SCIM never grants ownership, and the last owner cannot be removed.