On this page
Short answer: OIDC vs SAML is a choice between two federation protocols that deliver the same result: one sign-in at an identity provider, accepted by many applications. SAML 2.0 passes signed XML assertions through the browser. OpenID Connect (OIDC) is an identity layer on OAuth 2.0 that issues JSON Web Token ID tokens. Use OIDC when the app supports it; use SAML for apps that only speak SAML.
Key takeaways
- SAML 2.0 was approved as an OASIS Standard in March 2005 (OASIS), and a SAML response delivered through the browser with the HTTP POST binding must be signed with XML Signature (OASIS SAML 2.0 Technical Overview).
- OpenID Connect Core 1.0 describes itself as "a simple identity layer on top of the OAuth 2.0 protocol," and its current text incorporates errata set 2, dated December 15, 2023 (OpenID Foundation).
- Microsoft's SSO planning guidance for Entra ID says to choose OpenID Connect and OAuth if the application supports it, and SAML for existing applications that do not (Microsoft Learn).
- SAML apps carry a certificate to maintain: Entra ID creates a SAML signing certificate valid for three years by default, and Microsoft tells admins to plan renewals to avoid an outage (Microsoft Learn).
OIDC vs SAML at a glance
| Attribute | SAML 2.0 | OpenID Connect (OIDC) |
|---|---|---|
| Standards body | OASIS | OpenID Foundation |
| Built on | Its own XML protocol | OAuth 2.0 |
| What the app receives | Signed XML assertion | ID token as a JSON Web Token (JWT) |
| Terms for the parties | Identity provider (IdP) and service provider (SP) | OpenID provider and relying party (client) |
| How messages travel | Browser redirects and form posts (HTTP Redirect, POST, Artifact bindings) | Redirect to the authorization endpoint, then tokens from the token endpoint (Authorization Code flow) |
| Also grants API access | No | Yes, through the OAuth 2.0 access token issued alongside |
| Typical home | Established enterprise SaaS and on-prem web apps | New web apps, single-page apps, mobile apps and APIs |
| Entra ID guidance | For existing apps without OIDC | First choice when the app supports it |
How SAML and OIDC differ
Token format: XML assertion vs JWT ID token
SAML and OIDC both hand the application a signed statement about who the user is, in different formats. A SAML assertion is an XML document in which the identity provider makes statements about a subject (OASIS). An OIDC ID token is a JWT that must include five claims: iss (issuer), sub (subject), aud (audience, the client ID), exp (expiry) and iat (issued at) (OpenID Connect Core). For an admin, the practical difference is debugging: a JWT decodes to readable JSON, while SAML troubleshooting means reading base64-encoded, signed XML.
Message flows and transport
SAML's Web Browser SSO profile moves messages through the user's browser using the HTTP Redirect, HTTP POST or HTTP Artifact bindings, and supports both SP-initiated and IdP-initiated sign-in (OASIS). OIDC defines three flows: Authorization Code, where tokens come only from the token endpoint; Implicit, where all tokens come from the authorization endpoint; and Hybrid, which splits them (OpenID Connect Core).
Authentication only vs authentication plus API access
SAML answers one question: who is this user. OIDC answers the same question, and because it runs on OAuth 2.0, the same sign-in can also return an access token that lets the app call APIs. OAuth 2.0 on its own is an authorization framework for granting "limited access to an HTTP service," not a sign-in protocol (RFC 6749). OIDC adds the identity layer that OAuth lacks.
Trust setup and certificate upkeep
Both protocols rely on signing keys, but the admin workload differs. A SAML integration is usually set up by exchanging metadata and a signing certificate between IdP and SP, and that certificate expires. In Entra ID the default lifetime is three years, and Microsoft recommends named owners and a monitored distribution list for renewal notices (Microsoft Learn).
When to use SAML
SAML is the right choice when the application only supports SAML, which is still common for established enterprise software.
- The vendor's SSO page lists SAML only: many SaaS apps expose a SAML configuration screen and nothing else.
- Existing federations: apps already federated with SAML and working reliably rarely justify a rebuild.
- Browser-based web apps: SAML's bindings are designed around a user's browser, which fits classic server-rendered web apps.
- IdP-initiated sign-in from a portal: SAML's Web Browser SSO profile defines IdP-initiated flows, so users can launch the app from an app portal.
Watch out: track every SAML signing certificate's expiry date. An expired or rolled certificate that the app was not updated with breaks sign-in for that app, which is why Microsoft asks admins to plan the rollover process in advance (Microsoft Learn).
When to use OIDC
OIDC is the default for anything new, and it is Microsoft's stated first choice in Entra ID when an app supports it.
- Apps you build in-house: OIDC uses JSON and REST-style endpoints, which the OpenID Foundation describes as its design goal.
- Single-page and mobile apps: the Authorization Code flow returns tokens from a back-channel token endpoint rather than relying on browser form posts.
- Apps that call APIs: the same sign-in yields an OAuth 2.0 access token, so there is no second protocol to wire up.
- Short-lived trust instead of long-lived certificates: ID tokens carry an
expclaim, and the app validates them against the provider's published keys.
SAML and OIDC are two routes to single sign-on
Single sign-on (SSO) is the outcome: one sign-in that grants access to many applications. SAML and OIDC are two protocols that deliver it, and an identity provider usually offers both. Microsoft Entra ID alone lists OpenID Connect, OAuth, SAML, password-based and linked options for cloud apps, plus Integrated Windows Authentication and header-based options for on-prem apps (Microsoft Learn). Password-based SSO, also called password vaulting, is the fallback for apps that support no federation protocol.
Moving an app from SAML to OIDC
Moving from SAML to OIDC is only worth doing when the app vendor supports OIDC and there is a reason to change, such as API access or retiring certificate renewals.
- Confirm OIDC support in the app vendor's documentation, including which claims it expects.
- Map attributes to claims: list the SAML attributes the app reads (email, name ID, groups) and the matching OIDC claims.
- Create a new app registration in the identity provider rather than editing the SAML one, so you can roll back.
- Pilot with a small group assigned to the OIDC registration while everyone else stays on SAML.
- Check the user identifier: if the app keys accounts on the SAML NameID and OIDC sends a different
sub, users can end up with duplicate accounts. - Retire the SAML app and its certificate only after the pilot group signs in cleanly.
FAQ
OpenID Connect vs SAML: which should you choose?
For a new application, choose OpenID Connect. It returns an ID token as a JWT, builds on OAuth 2.0, and the same sign-in can issue an access token for APIs. Choose SAML when the application supports only SAML, which is common in established enterprise software. The SAML vs OIDC choice is made per application rather than once for the whole organisation, and Microsoft Entra ID supports both.
Is OIDC replacing SAML?
For new applications, OIDC is the usual choice, and Microsoft's Entra ID guidance prefers it where supported. SAML is not going away, because many existing enterprise applications support only SAML. Most identity providers support both.
Is OIDC more secure than SAML?
Neither protocol is inherently more secure; both rely on signed messages and correct validation by the application. Security depends on implementation: validating signatures, audience and expiry, and protecting signing keys. SAML adds certificate lifecycle work, while OIDC implementations need careful token validation.
Can one identity provider support both SAML and OIDC?
Yes. Microsoft Entra ID lists both OpenID Connect and SAML as SSO options for cloud applications, and you choose per application. The same user signs in once and reaches both SAML and OIDC apps.
What is the difference between OpenID and OpenID Connect?
OpenID Connect is the current OpenID Foundation standard, built on OAuth 2.0 and first finalized in 2014. Older OpenID versions used a different, non-OAuth design. When vendors say "OpenID" for SSO today, they almost always mean OpenID Connect.
Bottom line
If an application offers OIDC, configure OIDC; if it offers only SAML, use SAML and put its signing certificate expiry on a calendar with a named owner. Leave working SAML integrations alone unless you need API access or want to retire certificate renewals. To compare identity providers that handle both protocols, start with the single sign-on software category or build a list with the software shortlist tool.
Sources (5)
- OpenID Connect Core 1.0 incorporating errata set 2, OpenID Foundation, https://openid.net/specs/openid-connect-core-1_0.html, accessed September 22, 2026
- Security Assertion Markup Language (SAML) V2.0 Technical Overview, OASIS, https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html, accessed September 22, 2026
- RFC 6749, The OAuth 2.0 Authorization Framework, IETF, https://datatracker.ietf.org/doc/html/rfc6749, accessed September 22, 2026
- Plan a single sign-on deployment, Microsoft Learn, https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/plan-sso-deployment, accessed September 22, 2026
- Security Assertion Markup Language (SAML) v2.0, OASIS Open, https://www.oasis-open.org/standard/saml/, accessed September 22, 2026