IAM interview questions · Protocols
SAML or OpenID Connect for a new application?
In plain wordsSAML is a registered paper letter, great between offices. OIDC is a modern text message, made for apps and phones.
How it works
SAML 2.0 (2005) uses XML assertions over browser redirects and posts. It is everywhere in enterprise SaaS and works well for web SSO, but it is heavy, browser-only and has no native concept of API access.
OIDC (2014) builds on OAuth 2.0 with JSON and JWTs, works for web, mobile, SPAs and devices, comes with discovery and dynamic keys (JWKS), and gives access tokens for APIs in the same flow.
For a new app: OIDC by default. Use SAML when the app or a partner only supports SAML, or when you join an existing SAML federation (universities, government).
A concrete example
A company builds a new customer app (web + iOS) that calls its own APIs: OIDC with authorization code + PKCE, one IdP, access tokens for the APIs. The same company integrates an old HR SaaS that only speaks SAML: the IdP acts as SAML IdP for that app. Both work side by side.
See it in action: an assertion through the browser
Mistakes to avoid
- Saying SAML is insecure or obsolete: it is mature, just heavier.
- Choosing by habit without looking at clients (mobile, APIs).
They may also ask you
- How would you migrate an app from SAML to OIDC?
- Can one IdP serve both protocols?
- Go deeper
- SAML vs OpenID Connect →
- SAML 2.0 →