Single Sign-On & Directory Sync
Identity is where a governed AI platform starts: every budget, policy and audit record hangs off a person. AgentWatch integrates with the identity provider you already run rather than asking you to maintain a second user list.
Which protocols are supported?
Section titled “Which protocols are supported?”| Protocol | Support |
|---|---|
| SAML 2.0 | Native service provider — metadata exchange, signed assertions, certificate upload, IdP-initiated and SP-initiated flows, and Single Logout in both directions (2.0.412+) |
| OIDC / OAuth 2.0 | Standard authorization-code flow with PKCE (S256) against any compliant provider |
| LDAP / Active Directory | Direct bind with LDAPS and CA certificate upload |
| SCIM v2 | Per-organization provisioning and de-provisioning with managed tokens |
A unified hub-and-spoke setup wizard covers OIDC, SAML and LDAP, so the configuration path is the same shape whichever protocol you use. Providers are configured per organization, so each tenant in a multi-tenant deployment brings its own identity provider.
Does a first login create the user?
Section titled “Does a first login create the user?”That is your choice, per provider, and it is the single most consequential setting on this page.
- Auto-create on — the first successful login provisions the user, mints their gateway identity, and applies group-to-team mapping. Suitable when your identity provider is already the authority on who should have access.
- Auto-create off — the user lands in a pending state and no gateway key is issued until a tenant administrator approves them. Suitable when access must be granted deliberately.
An optional domain restriction narrows auto-creation to addresses on domains you own. Leaving it empty means anyone who can authenticate through that provider is provisioned, which is exactly right for some deployments and wrong for others — the field exists so that it is your decision rather than a default.
How do groups become teams?
Section titled “How do groups become teams?”Group-to-team mapping is unified across SAML, OIDC and LDAP, with three modes:
| Mode | Behavior |
|---|---|
| Off | Team is assigned by the default-team rule; groups are ignored |
| Automatic | A parse rule derives the team name from the group claim, so a new group creates a team without configuration |
| Mapped | An explicit table maps each group to a team, for when directory names and team names differ |
Team membership matters because team drives budget roll-ups, model-access scoping and every team filter in the console. A user with no team has no budget parent, so AgentWatch resolves a default team rather than leaving the field empty.
Roles can be assigned from the directory too, so an administrator in your IdP arrives as an administrator here.
What happens to roles and teams I set by hand before connecting SSO?
Section titled “What happens to roles and teams I set by hand before connecting SSO?”A workspace usually starts without SSO, so admins set each person’s role and team in Employee Management. Once an explicit group mapping (or a SCIM group) names a role or team for someone, the directory owns that field and applies it at each sign-in or directory push. Employee Management shows this: the field carries an SSO (or SCIM / LDAP) chip, and the edit dialog names the group, for example Set by SSO group Engineering.
You can still change it. Saving a different value overrides the directory for that one person and that one field: the row shows Override, and sign-in and SCIM leave the field alone. To hand it back, click the SSO button beside the Override chip. The group’s value then applies again at the person’s next sign-in or sync. Setting the field back to the group’s own value also hands it back.
| Situation | What happens |
|---|---|
| No mapping names this person’s role or team | Your hand-set value stays; nothing is overridden |
| A mapping names it, you have not edited it since | The group’s value applies at each sign-in or push |
| You saved a different value after the mapping set it | Override: the directory no longer changes it for this person |
| A mapping set to User would demote the workspace’s last admin | Refused and logged (sso-group-role-demote-refused-last-admin), so the workspace is never locked out of its console |
Hand-back over the API: DELETE /admin/users/:userId/directory-override/role (or /team), company admin only. An override is also recorded when a role changes through Transfer admin or a super admin’s Change tenant admin, so a directory mapping cannot undo either one.
Which role can a group mapping or default role give?
Section titled “Which role can a group mapping or default role give?”Three choices, the same everywhere in the console:
| Choice | Effect at sign-in |
|---|---|
| — no change — | The person’s role is left as it is |
| User | Sets the role to User (a company admin is demoted, unless they are the workspace’s last admin or an admin has overridden it) |
| Company admin | Sets the role to Company admin |
The provider’s default role (used when SSO creates a new account) is User or Company admin. Auto group mode never changes anyone’s role, because it would give every group the identity provider sends the same role; to grant Company admin, use Manual mode and map the named group. Super admin can never come from an identity provider.
A mapping saved before the role cleanup as Viewer, Manager or Owner now reads — no change —, which is what each of them always did. If you meant the group to grant a role, choose User or Company admin. See What happened to Owner, Manager, Viewer and “Team Admin”?
What exactly does my IdP put in the group claim?
Section titled “What exactly does my IdP put in the group claim?”This is the question that decides whether mapping works, and there is no single answer — which is why AgentWatch will tell you rather than make you guess:
curl -s "https://<your-agentwatch-host>/admin/sso/observed-groups?providerId=<provider id>" \ -H "Authorization: Bearer <admin JWT>"It returns the exact values your tenant has actually received, each flagged as opaque or not, ready to paste into a mapping. A sign-in whose groups match nothing is recorded in the log together with this URL.
What the major directories send by default:
| Directory | Default groups claim |
Notes |
|---|---|---|
| Microsoft Entra ID | Group object IDs (GUIDs) — e.g. 8f4c…-…-… |
Display names only when the app registration is configured to emit them; sAMAccountName for on-premises synced groups |
| Okta | Group names | Configurable per app |
| Google Workspace | Group email addresses | |
| LDAP / AD | Full distinguished names (CN=Engineering,OU=…) |
Entra emitting GUIDs is the cause of most group-mapping trouble, and it produced two distinct symptoms before this was handled:
- Automatic mode derived team names with a rule that leaves a GUID untouched, creating teams named after GUIDs. It now skips opaque identifiers instead of naming a team after one, and records why.
- Mapped mode required an exact, case-sensitive match against the raw
claim, so typing
Engineeringagainst a GUID claim matched nothing, silently.
Which spellings of a group name will match?
Section titled “Which spellings of a group name will match?”Matching is shape-tolerant and case-insensitive, so you can enter whichever form you have in front of you. All of these map the same directory group:
| You enter | Matches a claim of |
|---|---|
Engineering |
Engineering, CN=Engineering,OU=Groups,DC=corp, CORP\Engineering |
CN=Engineering,OU=Groups,DC=corp |
the same, in any of those spellings |
CORP\Engineering |
the same |
8f4c1e2a-… (object ID) |
that group’s GUID claim |
It is deliberately not a substring match: Engineering does not match
Engineering-Contractors. A mapping that matches too much puts people in teams
they do not belong to, which is worse than one that matches nothing.
If you would rather map by name than by GUID, configure group claims in the Entra app registration to emit names instead — either approach works.
How do I verify group mapping before rolling it out?
Section titled “How do I verify group mapping before rolling it out?”- Sign one pilot user in through the IdP.
- Read back what the claim actually contained:
GET /admin/sso/observed-groups?providerId=<id> - Add a mapping for each group you care about (Settings → Single Sign-On → your provider → Group mapping), pasting a value from step 2.
- Sign the pilot user in again and confirm their team in Employee Management.
You should now see the user in the mapped team, and their spend rolling up to that team’s budget.
Group mapping: symptom → cause → fix
Section titled “Group mapping: symptom → cause → fix”| Symptom | Cause | Fix |
|---|---|---|
| Teams appear named after GUIDs | Automatic mode against an Entra groups claim |
Upgrade to 2.0.283+; opaque ids are skipped. Delete the GUID-named teams and use Mapped mode, or emit names from Entra |
| A mapping is configured and nothing matches | The claim carries GUIDs while the mapping holds display names (or vice versa) | GET /admin/sso/observed-groups and paste a real value |
| Everyone lands in one team | Mapping mode is Off, or the IdP sends no group claim at all | Set the mode, and confirm the claim is actually emitted |
| A group mapping shows needs review (no effect) | Its stored role is not a role at all, or start-up migration is switched off (AW_ROLE_MIGRATION=0) |
Edit the mapping and choose User, Company admin or — no change — |
| An SSO-created user sees admin pages but every admin action returns 403 (before upgrading) | The OIDC default role stored company_admin, which admin APIs did not accept |
Upgrade: the value is rewritten to admin at start-up, and the person is a full company admin |
| A role or team set in Employee Management changed back at sign-in | A group mapping names that field; edits made before upgrading to this release were not recorded as overrides | Save the value again in Employee Management; it is now kept as an Override |
| A user is in too many teams | A mapping value is a prefix of several group names | Use the full distinguished name or the object ID |
PUT /scim/v2/Groups/:id returned 404 |
Replace-style group updates were unimplemented before 2.0.283 | Upgrade |
| SCIM creates duplicate users | userName/externalId matched case-sensitively before 2.0.283 |
Upgrade; both are caseExact:false per RFC 7643 §7 |
Does OIDC sign-in use PKCE?
Section titled “Does OIDC sign-in use PKCE?”Yes, since 2.0.412, on every OIDC provider by default, including providers that existed before the upgrade. Nothing needs reconfiguring at your identity provider: Microsoft Entra ID, Okta, Google, Auth0 and Keycloak all accept PKCE (RFC 7636) from a confidential client that also sends its client secret.
On each sign-in AgentWatch generates a fresh code_verifier and sends only its
SHA-256 hash to the IdP, as code_challenge with
code_challenge_method=S256. When the IdP redirects back, AgentWatch presents
the verifier at the token exchange. The verifier never goes to the browser: it
is held on the server, bound to that sign-in’s state, accepted once, and
expires with the state (5 minutes for the organization sign-in page, 10 for the
console). An authorization code intercepted on its way back is therefore useless
without it.
To confirm it is on, start a sign-in and look at the URL your browser is sent to at the IdP. It should contain:
...&code_challenge=<43 characters>&code_challenge_method=S256PKCE is left out of the request in two cases:
| Case | What happens |
|---|---|
The IdP’s discovery document (/.well-known/openid-configuration) lists code_challenge_methods_supported without S256 |
Skipped automatically for that IdP; logged as oidc_pkce_skipped with reason idp_does_not_advertise_s256 |
| You switched it off for the provider | Skipped; logged with reason provider_opt_out |
Switching PKCE off for one provider is meant for a legacy IdP that refuses
parameters it does not recognise. It is stored in the provider’s metadata, so
it needs no database change, and it accepts only a JSON boolean:
curl -X PUT https://<your-agentwatch-host>/api/admin/oauth2/providers/<provider id> \ -H "Authorization: Bearer <admin token>" \ -H "Content-Type: application/json" \ -d '{"pkceDisabled": true}'The response, and GET /api/admin/oauth2/providers/<provider id>, report
"pkceDisabled": true. Send false to turn it back on. The setting is not yet
in the console’s provider form.
The Google Workspace email sender connection (Settings → Email Notifications) uses PKCE in the same way.
Where are the step-by-step guides for my identity provider?
Section titled “Where are the step-by-step guides for my identity provider?”| Identity provider | Guide |
|---|---|
| Microsoft Entra ID — SAML sign-in + SCIM provisioning in one Enterprise application, or OIDC through an App registration | SSO & SCIM Setup — Microsoft Entra ID (Part B is SAML: B.1 create the non-gallery app → B.2 collect the Entra values → B.3 create the SAML provider in AgentWatch → B.4 Basic SAML Configuration → B.5 claims → B.7 assign users → B.9–B.14 SCIM) |
| Microsoft Entra ID, condensed with pictures, as part of a full Microsoft 365 rollout (SSO, Graph email, RMM and MDM) | Self-hosted rollout with Microsoft 365 → Part 2 |
| Google Workspace (SAML) | SAML SSO Setup |
| Okta, Auth0, Ping, Keycloak, ADFS | Use the values in How do I configure a provider? below; Okta’s single-logout signing is under How do I set up SAML single logout? |
For Entra, single logout is configured separately: see Microsoft Entra ID under single logout.
How do I configure a provider?
Section titled “How do I configure a provider?”All three protocols follow the same path: Settings → Single Sign-On → Add provider, choose the protocol, paste the values from your identity provider, save as a draft, run the built-in test, then enable it. Nothing takes effect until you enable it, so a misconfigured provider cannot lock anyone out.
What your identity provider needs from AgentWatch
| Field | Value |
|---|---|
| ACS / Reply URL (SAML) | https://<your-agentwatch-host>/api/auth/saml/callback/<provider id> |
| Redirect URI (OIDC) | https://<your-agentwatch-host>/api/auth/sso/callback — the same for every provider and organization (the sign-in’s state carries the organization). The console shows it read-only in the provider dialog; register exactly that value |
| Entity ID / Audience | the Entity ID you entered on the provider (SAML), shown on the provider row once saved |
| Logout URL / Single Logout URL (SAML, optional) | https://<your-agentwatch-host>/api/auth/saml/logout/<provider id> — see single logout |
SAML: what the “SAML Issuer (Entity ID)” field is
Section titled “SAML: what the “SAML Issuer (Entity ID)” field is”The SAML Issuer (Entity ID) you enter on a SAML provider is your identity
provider’s entity ID — the value Entra ID, Okta or ADFS uses to identify
itself (for Entra, https://sts.windows.net/{tenant}/). If you upload your
IdP’s metadata XML, AgentWatch fills it in for you from the document’s
entityID attribute.
It is not AgentWatch’s own entity ID. AgentWatch’s entity ID — the one your IdP needs in its SP configuration — is always:
https://<your-agentwatch-host>/api/auth/saml/metadata/<provider id>which is exactly what the metadata endpoint at that URL publishes. Nothing to set, and nothing to change on upgrade.
My SAML metadata says http:// — how do I fix it?
Section titled “My SAML metadata says http:// — how do I fix it?”If the Entity ID and ACS URL AgentWatch publishes begin with http:// while
your users reach it over HTTPS, your reverse proxy is terminating TLS without
telling AgentWatch. The connection AgentWatch sees is plain HTTP, so that is
what it advertises — and most identity providers refuse to register a
non-HTTPS Assertion Consumer Service URL, because SAML 2.0 expects assertions
to be protected in transit.
Check what your deployment publishes:
curl -s https://<your-agentwatch-host>/api/auth/saml/metadata/<provider id> | grep entityIDThere are two fixes. Prefer the first — it is one line of proxy configuration and needs nothing per-deployment.
1. Have the proxy declare the scheme. From 2.0.301 AgentWatch honours both the standards-track RFC 7239 header and the de-facto one. Set it on the frontend that terminates TLS, not on a port-80 frontend that only redirects — a redirect-only frontend never reaches the application, so the header there has no effect:
frontend https-in bind *:443 ssl crt /etc/pki/tls/certs/your.pem mode http http-request set-header X-Forwarded-Proto httpslocation / { proxy_pass http://agentwatch:8787; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme;}Use set-header rather than add-header: it replaces any value the caller
sent, so a client cannot spoof the scheme. Reload the proxy and re-run the
curl above — the entity ID should now begin https://.
2. Or pin it in AgentWatch. If you cannot change the proxy, set
AW_PUBLIC_BASE_URL (below). It takes precedence over every header, so no
request can influence it.
| Symptom | Cause | Fix |
|---|---|---|
Metadata shows http://, users reach HTTPS |
Proxy sends neither Forwarded nor X-Forwarded-Proto |
Set the header on the TLS frontend, or set AW_PUBLIC_BASE_URL |
| Header set but nothing changed | It is on a redirect-only (port 80) frontend | Move it to the frontend with bind *:443 ssl |
| IdP rejects the ACS URL | It is not HTTPS | As above, then re-upload or re-enter the metadata at the IdP |
| Entity ID changed after fixing this | The published entity ID now carries https |
Update the Entity ID registered at your IdP to match the metadata |
Set your public URL
Section titled “Set your public URL”Set AW_PUBLIC_BASE_URL to the externally reachable URL of your deployment,
without a trailing slash:
AW_PUBLIC_BASE_URL=https://agentwatch.example.comWhen it is unset, the SP metadata document and the ACS URL are built from the
Host header of whatever request asked for them. That header is set by the
caller, so metadata fetched through an unexpected hostname advertises that
hostname — and SP metadata is a document administrators hand directly to their
IdP. Setting this pins both values to your real address regardless of how the
request arrived. It is not mandatory, because requiring it would break existing
deployments on the one path where a wrong answer locks everybody out; AgentWatch
logs a one-time saml-public-base-unset warning instead.
Verify it took effect:
curl -s https://<your-agentwatch-host>/api/auth/saml/metadata/<provider id> | grep entityIDThe entityID and the Location of the AssertionConsumerService should both
name your public URL.
Over the API, for infrastructure-as-code:
curl -s -X POST https://<your-agentwatch-host>/api/admin/oauth2/providers \ -H "Authorization: Bearer <tenant-admin JWT>" \ -H 'Content-Type: application/json' \ -d '{ "name": "Okta", "protocol": "saml", "samlIssuer": "http://www.okta.com/exk…", "samlEntryPoint": "https://acme.okta.com/app/…/sso/saml", "samlCertificate": "-----BEGIN CERTIFICATE-----\nMIID…", "autoCreateUsers": true, "domainRestriction": "acme.com", "groupMappingMode": "mapped", "defaultRole": "user", "enabled": true }'For OIDC, send "protocol": "oidc" with issuerUrl, clientId, clientSecret
and scopes. For LDAP, use the LDAP provider form — host, bind DN, base DN,
LDAPS and an uploaded CA certificate.
How do I set up SAML single logout?
Section titled “How do I set up SAML single logout?”From 2.0.412, AgentWatch implements SAML 2.0 Single Logout (SLO) as a service provider, in both directions:
- Signing out of AgentWatch signs you out of the IdP. AgentWatch revokes its
own session first, then sends your browser to the identity provider with a
SAML
LogoutRequestnaming the sameNameIDandSessionIndexthe IdP issued at sign-in. The IdP ends its session and answers with aLogoutResponse, and you land on the AgentWatch sign-in page. - Signing out of the IdP signs you out of AgentWatch. When Entra ID or Okta
sends AgentWatch a signed
LogoutRequest, every AgentWatch session that IdP created for that user is revoked immediately — not when the session token would have expired — and AgentWatch answers with aLogoutResponse.
Single logout is optional and off until you set the IdP’s logout URL.
Without it, signing out of AgentWatch ends the AgentWatch session only, exactly
as before 2.0.412. Existing SAML sign-in is unchanged either way: the
AuthnRequest AgentWatch sends, its entity ID and its ACS URL are the same as
before.
You need two values, one in each direction:
| Value | Where it comes from | Where it goes |
|---|---|---|
| AgentWatch Single Logout URL | https://<your-agentwatch-host>/api/auth/saml/logout/<provider id> — shown in the wizard as Single Logout URL (SLO), and published in AgentWatch’s SP metadata as SingleLogoutService |
Your IdP’s application settings |
| IdP Single Logout URL | Your IdP — its metadata’s SingleLogoutService, or the console values below |
AgentWatch: Settings → Single Sign-On → (your SAML provider) → IdP Single Logout URL |
If you upload the IdP’s metadata XML in the wizard, the IdP Single Logout URL is
filled in automatically from its SingleLogoutService element. Through the API:
curl -X PUT "https://<your-agentwatch-host>/api/admin/oauth2/providers/<provider id>" \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"samlLogoutUrl":"https://login.microsoftonline.com/<tenant id>/saml2"}'The value must be an https:// URL. Send "samlLogoutUrl": "" to switch single
logout off again.
Microsoft Entra ID
Section titled “Microsoft Entra ID”- In the Entra admin center go to Enterprise applications → (your AgentWatch app) → Single sign-on → Basic SAML Configuration → Edit.
- Paste the AgentWatch Single Logout URL into Logout Url (Optional) and save.
- In the same page, section Set up AgentWatch, copy Logout URL
(
https://login.microsoftonline.com/<tenant id>/saml2). - In AgentWatch, open the SAML provider, paste it into IdP Single Logout URL, and save.
Entra does not require AgentWatch to sign its LogoutRequest, so nothing else
is needed.
Okta only offers single logout to applications that sign their logout requests, so AgentWatch needs a signing key first:
- Create a key pair for AgentWatch:
Terminal window openssl req -x509 -newkey rsa:2048 -nodes -days 1095 \-keyout aw-saml-sp.key -out aw-saml-sp.crt -subj "/CN=agentwatch-saml-sp" - Give AgentWatch the private key — set
AW_SAML_SP_SIGNING_KEYin the container environment to the key’s PEM text or to the path of the file, and restart. It is used only to sign logout messages; sign-in requests stay unsigned, as before. - In the Okta admin console go to Applications → (your AgentWatch app) → General → SAML Settings → Edit → Next → Show Advanced Settings.
- Tick Enable Single Logout, paste the AgentWatch Single Logout URL
into Single Logout URL, set SP Issuer to AgentWatch’s entity ID
(
https://<your-agentwatch-host>/api/auth/saml/metadata/<provider id>), and uploadaw-saml-sp.crtas the Signature Certificate. Save. - On the app’s Sign On tab, open View SAML setup instructions and copy the Identity Provider Single Logout URL.
- In AgentWatch, paste it into the provider’s IdP Single Logout URL and save.
How do I verify it?
Section titled “How do I verify it?”- Fetch AgentWatch’s metadata and confirm the logout endpoint is published:
You should see two
Terminal window curl -s "https://<your-agentwatch-host>/api/auth/saml/metadata/<provider id>" | grep SingleLogoutServiceSingleLogoutServicelines (HTTP-Redirect and HTTP-POST) pointing at/api/auth/saml/logout/<provider id>. - Sign in to AgentWatch through the IdP, then choose Sign out. Your browser should briefly visit the IdP and return to the AgentWatch sign-in page. Opening any IdP-protected application in the same browser should now ask you to sign in again.
- Sign in again, then sign out from the IdP (for Entra,
https://myapps.microsoft.com→ your profile → Sign out). Reload the AgentWatch console: it should return to the sign-in page, because the session was revoked server-side. - In the container log, the three steps appear as
saml-slo-sp-start,saml-slo-sp-completeandsaml-slo-idp-logout(with the number of sessions revoked).
Single logout: symptom → cause → fix
Section titled “Single logout: symptom → cause → fix”| Symptom | Cause | Fix |
|---|---|---|
| Sign-out returns straight to the AgentWatch login and the IdP session survives | No IdP Single Logout URL on the provider, or the user signed in before 2.0.412 (the session has no recorded SAML subject) | Set the URL; sessions created after the upgrade will log out at the IdP |
Login page shows slo_error=unknown_in_response_to |
The IdP’s LogoutResponse did not answer a logout AgentWatch started — expired (over 10 minutes), already used, or AgentWatch restarted in between |
Nothing to fix for that sign-out — the AgentWatch session was already ended. If it recurs, check that only one AgentWatch process serves SAML |
Login page shows slo_error=invalid_logout_response |
The response’s signature did not verify against the IdP certificate on the provider | Re-upload the IdP’s current signing certificate |
Login page shows slo_error=idp_logout_not_successful |
The IdP reported it could not end its session (for example Okta without a signature certificate) | For Okta, complete the signing-key steps above |
IdP logout shows an error and AgentWatch logs saml-slo-unsigned (HTTP 403) |
The IdP sent an unsigned LogoutRequest. AgentWatch refuses these: an unsigned request would let any web page sign your users out |
Enable signing of logout requests in the IdP |
HTTP 403 LogoutRequest failed signature or validity checks |
Signed with a key that does not match the provider’s certificate, or the request expired | Re-upload the IdP signing certificate; check clock skew |
| IdP-initiated logout ends at a page saying “Signed out” instead of returning to the IdP | No IdP Single Logout URL, so AgentWatch has nowhere to send its LogoutResponse |
Set the IdP Single Logout URL |
| Okta rejects the logout request | AgentWatch is not signing (AW_SAML_SP_SIGNING_KEY unset) or Okta has a different signature certificate |
Set the key and upload the matching certificate to Okta |
400 samlLogoutUrl must be an https:// URL |
The value pasted is http:// or not a URL |
Paste the IdP’s https logout URL |
Single logout covers console sessions created by SAML sign-in. Enrollment-
portal sign-ins and API keys are not affected by it, by design: an ak_ gateway
key is not a browser session.
How do I test it before rolling it out?
Section titled “How do I test it before rolling it out?”- Save the provider as a draft (leave
enabledfalse). - Use Test connection on the provider row — it performs a real bind or metadata fetch and reports the actual error, not a generic failure.
- Sign in from a private browser window with one pilot account.
- Check Employee Management: the user should exist, with the expected team and role, and a gateway key if auto-create is on.
- Enable the provider for everyone.
How do I set up SCIM?
Section titled “How do I set up SCIM?”- Settings → Single Sign-On → SCIM, generate a token for the organization.
- In your identity provider, set the SCIM base URL to
https://<your-agentwatch-host>/scim/v2and paste the token as the bearer credential. - Push a test user and confirm they appear; then push a group and confirm the team is created or mapped.
- De-provision that test user in your directory and confirm their key stops authenticating — this is the half most rollouts forget to verify.
Tokens are per organization and revocable from the same screen, so a leaked token is contained to one tenant.
Common problems
Section titled “Common problems”| Symptom | Cause | Fix |
|---|---|---|
| Login loops back to the sign-in page | ACS/redirect URL mismatch | Make the value in your IdP match the provider row exactly, including the provider id |
Invalid signature on SAML |
Wrong or stale certificate | Re-upload the current IdP signing certificate |
| User signs in but has no access | autoCreateUsers is off and they are pending |
Approve them in Employee Management, or enable auto-create |
| User signs in but API calls return 401 | They have a login but no gateway identity | Provision them, or see delegated identity |
| Everyone lands in one team | Group mapping is off, or the claim is missing | Set the mapping mode and confirm your IdP actually sends the group claim |
| Mapping is configured but nothing matches | The claim carries object IDs (GUIDs) while the mapping holds display names — Entra’s default | GET /admin/sso/observed-groups and paste a value your IdP actually sent |
| Teams appear named after GUIDs | Automatic mode against an Entra group claim | Upgrade to 2.0.283+, then map explicitly or emit names from Entra |
| Nobody can sign in after enabling | Domain restriction excludes their address | Widen or clear the domain restriction |
After upgrading to 2.0.412, the IdP shows an error such as invalid_request, unsupported parameter code_challenge or code_challenge_method not supported |
A legacy IdP that refuses PKCE parameters | Check the IdP supports PKCE S256; if it cannot, set "pkceDisabled": true on that provider (see Does OIDC sign-in use PKCE?) |
The IdP refuses the sign-in because PKCE is required (Entra AADSTS9002325, Okta/Keycloak code_challenge required) |
The app is configured at the IdP to require PKCE while this provider has pkceDisabled set |
Send "pkceDisabled": false for the provider |
State already used — start the sign-in again |
The callback URL was reloaded or replayed; each sign-in can be completed once | Start the sign-in again from the sign-in page |
No account matching <address> exists in this organization |
The address in your IdP token is not the one the employee was provisioned under | Compare it with the Contact column in Employee Management — see below |
Email not verified by your IdP… assert email_verified=true |
A release earlier than 2.0.293 | Upgrade. Entra omits the email claim for accounts without a mailbox, and before 2.0.293 that skipped the provisioned-user check entirely |
SCIM employees show — in the Team column |
Created before 2.0.293, which fixed only new employees | Upgrade to 2.0.304+ — a one-time sweep at startup fills them in |
Provisioning fails with Unsupported PATCH path: <attribute> |
An attribute in your IdP mapping that AgentWatch has no field for (job title, department, employee ID) | Upgrade to 2.0.306+; before that, remove the attribute from the mapping |
| A user’s details changed in the IdP but not in AgentWatch | The same thing — one unsupported attribute rejected the whole update, so the changes beside it never applied | Upgrade to 2.0.306+; Entra retries failed users on the next cycle (~40 min). If provisioning is quarantined it will not resume on its own — use Restart provisioning |
Why does one account sign in and another not?
Section titled “Why does one account sign in and another not?”Almost always because the two accounts carry different email claims, not because one of them is configured differently in AgentWatch.
Microsoft Entra fills the email claim from the account’s mail attribute.
A normal user has a mailbox, so the claim is present. A privileged or
administrative account — the a- prefixed accounts many organisations use —
often has no mailbox, so Entra sends no email claim and falls back to the
UPN. If the UPN is spelled differently from the address SCIM provisioned
(a-mark.deckert@example.com versus a-mdeckert@example.com), sign-in is
refused even though the employee is plainly listed in Employee Management.
The refusal message names the address we searched for. Compare it against the Contact column for that employee:
- They match — the account is not in this organization. Add it, or check you are signing in to the right tenant.
- They differ — this is the cause. Either correct the employee’s email to
the UPN the IdP actually sends, or have the IdP send the provisioned address
(in Entra, add
emailas an optional claim under App registration → Token configuration, or populate the account’s mail attribute).
email_verified is not the cause, despite what releases before 2.0.304 said.
Entra work accounts do not send that claim at all, and AgentWatch does not
require it for an account that already exists.
What does SCIM provisioning cover?
Section titled “What does SCIM provisioning cover?”SCIM v2 handles the full lifecycle without a login: users created, updated, suspended and de-provisioned from your identity provider, and group membership synchronized to teams. Each organization gets its own SCIM token, managed and revocable from the console, so a token leak is contained to one tenant.
De-provisioning is the half that matters most: a user disabled in your directory loses gateway access, and their API key stops authenticating.
Can employees get gateway access without ever logging in?
Section titled “Can employees get gateway access without ever logging in?”Yes, and for most deployments that is the point. An employee’s gateway identity — the ak_ key their applications use — is independent of console sign-in. Employees can be created by SSO, SCIM, CSV import, the employee wizard, or automatically by a service key (see delegated identity), and a person can hold a governed gateway identity with no usable console password at all.
What if we have no identity provider?
Section titled “What if we have no identity provider?”Local accounts work, with password policy, lockout after repeated failures, forced password change, and administrator-driven resets. Organizations commonly start local and add SSO later; existing users are matched by email address when a provider is introduced, so adopting SSO does not duplicate anyone.
Sources and references
Section titled “Sources and references”- What a provisioned employee can then do: Delegated identity and Auto Create Users.
- Roles, audit and session policy: Security and compliance.
- Identity providers in the wider integration list: Integrations.
- Enrolling devices rather than users: Endpoint enrollment.