SAML vs OIDC: which one should your B2B app support?
Doha I. · Published · Lire en français

OpenID Connect (OIDC) is the modern, JSON and JWT based standard built on OAuth 2.0, best for new web, mobile and API scenarios. SAML 2.0 is the older XML based standard that many enterprise tools still expect. B2B products usually need both, OIDC for their own apps and SAML for the business applications their customers already use.
Sooner or later a larger customer asks: "Do you support SSO?" Usually they mean SAML or OpenID Connect. Both let a user sign in once with an identity provider and reach other applications without new passwords, but they come from different eras.
OpenID Connect in brief
OpenID Connect (2014) adds an identity layer to OAuth 2.0. The application redirects the user to the provider, receives an authorization code, exchanges it for a signed ID token (a JWT) and validates it with the provider's public keys (JWKS). Configuration is discovered from /.well-known/openid-configuration.
- Format: JSON and JWT
- Transport: redirects and back-channel HTTPS calls
- Strengths: mobile and single-page apps, APIs (access tokens), simple libraries in every language
SAML 2.0 in brief
SAML 2.0 (2005) exchanges XML documents. The application (service provider) sends a SAML request; the identity provider authenticates the user and posts a signed SAML assertion to the application's Assertion Consumer Service (ACS) URL. Both sides are identified by an entity ID and exchange metadata.
- Format: XML with XML signatures
- Transport: browser redirects and form posts
- Strengths: ubiquitous in enterprise software, HR systems, intranets and older SaaS
Side by side
| OpenID Connect | SAML 2.0 | |
|---|---|---|
| Year | 2014 | 2005 |
| Token | ID token (JWT) | Assertion (XML) |
| Built on | OAuth 2.0 | Its own protocol |
| Mobile and SPA | Designed for it | Awkward |
| API access | Yes, with access tokens | No |
| Enterprise tools | Growing | Everywhere |
| Setup | Client ID, secret or PKCE, callback URL | Entity ID, ACS URL, certificates, metadata |
Which one should you support?
- Your own new apps: OpenID Connect with the authorization code flow and S256 PKCE.
- Business apps your customers already run: SAML, because that is what those tools speak.
- Enterprise deals: often both, plus SCIM so accounts are created and removed automatically. SSO handles sign-in; SCIM handles the user lifecycle.
Two roles to tell apart
"Supporting SAML" can mean two different things:
- Being a SAML identity provider: your platform signs users into other applications.
- Accepting an inbound SAML connection: your app lets users sign in with their company's identity provider (their Okta or Entra ID).
Check which one a customer needs before you promise anything.
How SyAuth handles it
SyAuth is an OpenID Connect provider for your applications and a SAML 2.0 identity provider for the business applications you register (entity ID and ACS URL), with SCIM 2.0 user and group provisioning, on every plan. It also supports SAML Single Logout started from an application. Today it does not accept external SAML identity providers as inbound connections; that limit and others are listed in the documentation. More: SAML single sign-on, OpenID Connect, SCIM.