Troubleshooting · SCIM and directory
SCIM answers 401 or 403 (token expired, revoked or missing a scope)
Symptom
Provisioning in Microsoft Entra ID or Okta fails. The identity provider's log shows 401 Unauthorized or 403 Forbidden answers, and new people do not appear in the console.
Cause
| Answer | Cause |
|---|---|
| 401 | Token missing, wrong, expired or revoked. For security, all get the same answer |
| 401 after a rotation | The old token's grace period ended and the provider still uses the old secret |
| 403 | The token lacks the resource's scope (for example «Groups (scim:groups)» is missing) |
| 403 when creating people | No free seats in the licence, or the organization is read-only |
Fix
- Open «Manage» › «SCIM tokens» and check the token's state: «Active», «Expiring soon», «Expired» or «Revoked». The «Last used» column tells you whether the provider is using it.
- Expired or revoked token: choose «Create token», with both scopes, and copy the «Tenant URL» and «Secret token» into the identity provider.
- Expiring token: use «Rotate token» with a grace period (for example 24 hours) and update the provider within it.
- Missing scope: create a new token with «Users (scim:users)» and «Groups (scim:groups)».
- Seats: see Limit reached.
- In the identity provider, use "Test connection" and restart provisioning.
If you see «This organization already has five live SCIM tokens. Revoke one first.», revoke an old token before creating another.
How do I stop it happening again?
Choose a suitable validity (up to 2 years), note the end date and rotate the token before «Expiring soon» runs out.
When to escalate
If the token is «Active», has both scopes and the provider still gets 401, contact support with the time and the token's name (never the secret).
Error codes in this article
Was this page helpful?
Thank you. Your answer stays in this browser; nothing is sent.
Sorry about that. Try:
- searching for the exact text of the message or the error code
- the error code index
- asking your organization's administrator