Integrations · OIDC + SAML

Salesforce SSO

Enable Single Sign-On for Salesforce CRM and Experience Cloud using Clavex as the IdP. Salesforce supports both SAML 2.0 (classic) and OIDC (Connected Apps). This guide covers both approaches — use SAML for standard Salesforce SSO and OIDC for connected apps or API access.


Option A — SAML 2.0 SSO (Recommended for Salesforce Orgs)

Step A1 — Clavex IdP Parameters

ParameterValue
Entity ID (Issuer)https://id.acme.eu/acme/saml
SSO URLhttps://id.acme.eu/acme/saml/sso
SLO URLhttps://id.acme.eu/acme/saml/slo
CertificateDownload from /acme/saml/idp/metadata

Step A2 — Configure SAML SSO in Salesforce

  1. SetupIdentitySingle Sign-On Settings
  2. Click New (SAML 2.0)
  3. Fill in:
    FieldValue
    NameClavex
    API nameclavex
    Issuerhttps://id.acme.eu/acme/saml
    Identity provider's certificateUpload Clavex signing cert (PEM)
    Request signing certificateLeave default or upload SP cert
    Identity provider login URLhttps://id.acme.eu/acme/saml/sso
    SAML Identity typeAssertion contains User's Salesforce username
    SAML Identity locationIdentity is in the NameIdentifier element
    Service provider initiated request bindingHTTP Redirect
  4. Save and note the Salesforce Login URL and Audience displayed on the detail page

Step A3 — Register Salesforce SP in Clavex

Admin API (curl)
# Entity ID and ACS URL are shown on Salesforce SSO settings detail page # Typical values for a production org: $ 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://saml.salesforce.com", "acs_url": "https://acme.my.salesforce.com?so=00D000000000001", "name_id_format": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", "sign_assertions": true }'
Find your ACS URL: In Salesforce Setup → Single Sign-On Settings → click your SSO config → the Salesforce Login URL field is the ACS URL. It looks like https://acme.my.salesforce.com?so=00D…

Option B — OIDC Connected App

Step B1 — 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": "salesforce", "client_name": "Salesforce", "grant_types": ["authorization_code"], "redirect_uris": ["https://acme.my.salesforce.com/services/authcallback/clavex"], "scopes": ["openid", "profile", "email"], "token_endpoint_auth_method": "client_secret_post" }'

Step B2 — Create Auth Provider in Salesforce

  1. SetupAuth. ProvidersNew → type OpenID Connect
  2. Fill in:
    FieldValue
    NameClavex
    URL suffixclavex
    Consumer keysalesforce
    Consumer secretcs_xxxxxxxxxxxxxxxx
    Authorize endpoint URLhttps://id.acme.eu/acme/authorize
    Token endpoint URLhttps://id.acme.eu/acme/token
    User info endpoint URLhttps://id.acme.eu/acme/userinfo
    Default scopesopenid profile email

Troubleshooting

SymptomCauseFix
We can't log you in because of an issue with single sign-on NameID value doesn't match Salesforce username Ensure the SAML NameID value is the exact Salesforce username (email format)
Certificate error Expired or wrong certificate uploaded to Salesforce Re-download from /acme/saml/idp/metadata and re-upload
OIDC: invalid_client_credentials Wrong consumer key/secret Verify Auth Provider settings match Clavex client registration