Integrations · OIDC + SAML

ServiceNow SSO

Configure Single Sign-On for ServiceNow ITSM using Clavex as the Identity Provider. Supports OIDC (recommended for new deployments) and SAML 2.0. Includes role/group mapping from Clavex claims to ServiceNow roles.


Option A — OIDC (Recommended)

Step A1 — Register OIDC Client in Clavex

Admin API (curl)
$ curl -X POST https://id.acme.eu/api/v1/organizations/acme/clients \ -H 'Authorization: Bearer $ADMIN_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "client_id": "servicenow", "client_name": "ServiceNow", "grant_types": ["authorization_code"], "redirect_uris": ["https://acme.service-now.com/navpage.do"], "scopes": ["openid", "profile", "email", "groups"], "token_endpoint_auth_method": "client_secret_basic" }'

Step A2 — Configure OIDC Provider in ServiceNow

  1. In ServiceNow, navigate to System OAuthExternal OIDC ProvidersNew
  2. Fill in:
    FieldValue
    NameClavex
    Client IDservicenow
    Client secretcs_xxxxxxxxxxxxxxxx
    Well-known config URLhttps://id.acme.eu/acme/.well-known/openid-configuration
    User claimemail
    Default auth. scopeopenid profile email groups
  3. Click Populate OIDC metadata — ServiceNow fetches all endpoints from discovery
  4. Save

Step A3 — Create Multi-Provider SSO Profile

  1. Multi-Provider SSOIdentity ProvidersNew
  2. Set type to OpenID Connect
  3. Link the OIDC provider created above
  4. Set User field to email and Identity provider's user field to email
  5. Enable Auto-provision users if needed

Option B — SAML 2.0

Step B1 — Configure SAML in ServiceNow

  1. Navigate to Multi-Provider SSOIdentity ProvidersNew
  2. Select type SAML2 Update1
  3. Upload Clavex metadata XML or enter manually:
    FieldValue
    IdP's EntityID/Issuerhttps://id.acme.eu/acme/saml
    IdP's AuthnRequest bindingHTTP-Redirect
    IdP's SSO URLhttps://id.acme.eu/acme/saml/sso
    IdP's SLO URLhttps://id.acme.eu/acme/saml/slo
    IdP's certificatePaste Base64 from Clavex metadata
  4. Note the EntityID and ACS URL shown by ServiceNow

Step B2 — Register ServiceNow SP in Clavex

Admin API (curl)
$ curl -X POST https://id.acme.eu/api/v1/organizations/acme/saml/sp \ -H 'Authorization: Bearer $ADMIN_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "entity_id": "https://acme.service-now.com", "acs_url": "https://acme.service-now.com/navpage.do", "name_id_format": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "sign_assertions": true }'

Role Mapping

In ServiceNow, create a Claim Mapping to translate Clavex groups claim values to ServiceNow roles:

  1. Multi-Provider SSOIdentity Providers → your provider → Claim Mappings
  2. Add a new mapping:
    Claim attributeServiceNow user field
    groupsroles (via script transform)
    emailemail
    namename

Troubleshooting

SymptomCauseFix
User not found after SSO login User not provisioned in ServiceNow Enable Auto-provision users or create the user manually with matching email
OIDC discovery URL fails ServiceNow can't reach Clavex Check network/firewall rules; ServiceNow IP ranges must reach your Clavex instance
SAML assertion rejected Audience restriction mismatch Ensure SP entity_id in Clavex matches exactly the EntityID shown in ServiceNow SSO settings
Redirect after login goes to home, not original page RelayState not preserved Enable Use relay state in the ServiceNow Identity Provider settings