# How do federated identity and SAML single sign-on streamline authentication across enterprise integration landscapes?

**Topic:** Integration · **Difficulty:** Medium · **Tags:** Integration, Federated Identity, Single Sign-On

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-federated-identity-and-saml-single-sign-on-streamline-authentication-across-enterprise-integration

## Answer

**Basics:** SSO reduces password sprawl and lets the company enforce MFA, session policy and de-provisioning in one place. Salesforce can be the service provider (SP, trusting an IdP such as Okta or Entra ID) or the IdP (for connected apps).

**How it works:**
1. Enable My Domain (required for SSO).
2. Setup > Single Sign-On Settings: enable SAML, add the IdP issuer, entity ID, certificate and login URL.
3. Map the identity: the assertion subject must match the user's Federation ID or username.
4. User flow: open the My Domain URL, get redirected to the IdP, authenticate, and return to Salesforce with a signed SAML assertion.
5. Optional: Just-in-Time provisioning creates and updates users from assertion attributes. Add the login option to the My Domain login page, or enforce SSO only.
6. For OpenID Connect, use an Auth Provider with a registration handler.

**Advanced / deep dive:** For human users, SAML or OIDC SSO is right. For unattended integrations, use OAuth flows such as JWT Bearer, because there is no browser or person. The SAML Bearer Assertion flow lets a system exchange a SAML assertion for an access token. Delegated authentication is a legacy option where Salesforce calls your service to check credentials. Salesforce requires MFA for all users, and with SSO the MFA is typically satisfied at the IdP, which sends the right authentication context. Using a federation ID that is immutable (not an email) avoids breaking login when addresses change.

**Code / config example:**
```text
SAML assertion (key fields)
Issuer: https://idp.example.com
Subject NameID: 00u1abcd (matches User.FederationIdentifier)
Audience: https://mydomain.my.salesforce.com
Attribute: email, firstName, lastName (used by JIT)
Signature: RSA-SHA256 using the IdP certificate uploaded in Salesforce
```

**Hidden gotchas & must-remember points:**
- My Domain is required for SSO.
- Federation ID is case-sensitive and must be unique.
- Admins and API users may still need password login. Keep a break-glass account or a login override for outages.
- Expired IdP certificates break login for everyone.
- SSO does not authenticate API clients, which use OAuth.
- Clock skew between IdP and Salesforce can reject assertions.

**Best practice:** Use an immutable federation ID, enforce MFA at the IdP, and monitor certificate expiry.

---
Source: ForceChallenges · last updated 2026-11-02
