SSO & SCIM Troubleshooting
This page covers common problems and how to use the activity log to diagnose them.
The activity log
All SSO and SCIM events are recorded under Settings → Account → Identity → Activity. The log shows the last 7 days, filterable by event type.
Always-on events:
| Event type | When it fires |
|---|---|
sso_error | Anything that went wrong during sign-in |
sso_presignup_reject | A user was blocked at pre-signup — typically SCIM is enabled and the user hasn't been provisioned yet, or SSO isn't enabled on the tenant |
sso_user_created | A new Agility user was JIT-created on first SSO sign-in |
sso_user_attributes_updated | An existing user's name, phone, or roles were re-synced from IdP claims |
scim_error | A SCIM request failed |
scim_provision | A user was created or updated via SCIM |
scim_deprovision | A user was deactivated via SCIM |
Debug-only events (enable Log successful events (debug) to see these):
| Event type | When it fires |
|---|---|
sso_login_success | A user successfully signed in via SSO (one event per sign-in, regardless of whether anything changed) |
scim_read | A SCIM read request with full request/response payload |
Always-on events cover every mutation — user creates, attribute/role changes, SCIM writes, errors. Debug mode adds visibility into no-op sign-ins and SCIM reads, which are higher-volume and lower-audit-value. Turn debug off after go-live to keep the log readable.
Click any row in the table to expand it and see the underlying detail — claim values, request bodies, error messages, HTTP status codes.
SSO problems
sso_presignup_reject — SCIM required, user not provisioned
Cause: The tenant has SCIM enabled, and the user signing in does not yet exist in Agility. JIT user creation is disabled when SCIM is on.
Fix:
- Make sure the user is assigned to the Agility app in your IdP.
- Trigger a sync from your IdP (Okta and Entra usually run automatically every 40 minutes).
- Check the Activity tab for a corresponding
scim_provisionevent. - Have the user retry.
Users sign in but have no roles
Cause: None of the IdP groups (or attribute values) sent by your IdP match any row in your role mapping table.
Fix:
- Enable Log successful events (debug) on the Activity tab.
- Have the user sign in again.
- Open the
sso_login_successevent (orsso_user_attributes_updatedif roles changed) and inspect the claim values your IdP actually sent. - Check that:
- Your IdP is including a
groupsclaim (or the attribute you configured). - The values match your role mapping table exactly — matching is case-sensitive.
- Your IdP is including a
Common gotchas:
- Entra sends group object IDs (GUIDs) by default, not group names. The recommended fix is to switch to App Roles — see Set up Entra ID. As a quicker workaround, set the group claim's Source attribute to Cloud-only group display names (cloud-only Entra groups) or sAMAccountName (on-prem AD-synced groups). Pasting raw GUIDs into your role mapping table works for SAML and OIDC but does not work for SCIM tenants — SCIM matches groups by display name, not object ID.
- Okta sends only the groups that match the filter in the Group Attribute Statement — if the filter is too narrow, expected groups won't appear.
given_name and family_name are missing or empty
Cause: Your IdP isn't sending given_name / family_name claims under those exact names, or isn't sending them at all.
Fix:
- Okta SAML: In Attribute Statements, add
given_name → user.firstNameandfamily_name → user.lastName. - Okta OIDC: Make sure the
profilescope is granted; Okta sendsgiven_name/family_nameautomatically in that scope. - Entra SAML: In Attributes & Claims, ensure
given_nameis mapped touser.givennameandfamily_nametouser.surname. - Entra OIDC: Make sure the
profilepermission is granted with admin consent.
If your IdP can't be changed but does send the names under different claim names (e.g. firstName, lastName), contact your Agility account team — we can configure a per-tenant attribute mapping override.
"We couldn't sign you in" on the OTP step
Cause: Either the wrong code was entered, the code expired (10 minutes), or the IdP discovery service is unreachable.
Fix:
- Have the user request a new code and try again.
- If the error mentions discovery, check the Activity tab for
sso_errorevents; this usually indicates a misconfigured tenant SSO setting.
Multi-tenant user can't pick a tenant
Cause: The user belongs to more than one SSO-enabled tenant. By design, they see a tenant picker after entering the OTP. They must pick one before being redirected to the IdP.
Fix: No action needed — this is expected. Confirm the user actually has access to the tenant they're trying to reach.
Test Connection passes but real sign-in fails
Cause: The Test Connection button validates configuration without invoking your IdP — it checks that URLs are reachable, certificates parse, and the discovery document is well-formed. Real sign-in can still fail if:
- The user isn't assigned to the Agility app in your IdP.
- Your IdP rejects the redirect URI (typo in what you pasted, or extra trailing slash).
- Your IdP doesn't actually send the claims Agility expects (see "Users sign in but have no roles").
Fix:
- Have a real user attempt to sign in.
- Check the Activity tab for
sso_errorevents. - Read the detail row — it includes the underlying error from the IdP or Agility's sign-in service.
SCIM problems
SCIM requests return 401 Unauthorized
Cause: The bearer token (API key) in your IdP's SCIM configuration is missing, expired, or doesn't match an active key.
Fix:
- In Agility, go to Settings → Account → API Keys and confirm the key is still active.
- If you've rotated keys, update the token in your IdP's SCIM connector.
- For Okta: Provisioning → To App → Edit → API Token.
- For Entra: Provisioning → Admin Credentials → Secret Token.
SCIM requests return 404 or wrong tenant
Cause: The SCIM endpoint URL in your IdP is pointing at the wrong tenant ID, or includes a typo.
Fix: Copy the SCIM endpoint from the portal again — use the copy button on the SCIM tab. The URL must include your tenant's exact ID after /scim/v2/.
Users provision but with no roles
Cause: Same root cause as the SSO version: SCIM isn't sending group memberships (or the configured attribute), or values don't match the role mapping table.
Fix:
- Enable debug logging on the Activity tab.
- Inspect a
scim_readorscim_provisionevent after the next sync. - Confirm the group/attribute values your IdP is sending.
- Adjust the role mapping table to match.
A user was removed in the IdP but still has access
Cause: SCIM deprovisioning hasn't run yet, or the user was unassigned from the app without being deactivated.
Fix:
- Trigger a manual SCIM sync from your IdP.
- Check the Activity tab for a
scim_deprovisionevent. - If the event doesn't appear, confirm your IdP is configured to send a deactivation (Okta: enable Deactivate Users under provisioning settings; Entra: ensure the user is unassigned from the app, not just removed from a group).
SAML signing problems
"SAML validation failed: Invalid document signature"
Cause (most common — Entra): Entra is signing only the outer SAML response and not the assertion inside it. Agility requires the assertion to be signed.
Fix (Entra):
- In your Entra enterprise application, open Single sign-on.
- In the SAML Certificates section, click the edit (pencil) icon at the top right.
- Change Signing Option from Sign SAML response to Sign SAML response and assertion.
- Leave Signing Algorithm at SHA-256.
- Save and retry sign-in.
Other causes worth checking:
- The certificate pasted into Agility doesn't match the one the IdP is signing with (e.g. the IdP rotated keys after you configured Agility). Re-import the metadata URL to refresh the certificate.
- The certificate is correct but truncated or has whitespace inside the Base64 body. Re-paste the certificate as a single contiguous Base64 block (PEM headers optional).
- The IdP is signing with SHA-1 in an environment that requires SHA-256, or vice versa. Standardize on SHA-256.
Sign-in fails after IdP rotates the SAML certificate
Cause: Your IdP started signing assertions with a new certificate, but Agility only has the old one.
Fix:
- Before rotation, paste the next certificate into the Signing Certificates field in Agility using the + icon next to the certificate list. Agility accepts assertions signed by any of the configured certificates, so both old and new will work during the rollover window.
- After your IdP cuts over, remove the old certificate.
If you missed the rotation window, simply re-import the metadata URL — Agility will fetch the current certificate from your IdP and replace the stored one.
Still stuck
If you've worked through the above and SSO or SCIM still isn't working:
- Reproduce the failure with a single test user.
- Note the approximate timestamp of the attempt.
- Capture the relevant entry from the Activity tab (screenshot or copy the detail JSON).
- Open a support request and include the timestamp, tenant ID, user email, and the captured event detail.
We officially support Okta and Entra ID for both SSO and SCIM. Other standards-compliant IdPs may work but are best-effort.