# SAML vs OIDC: how an app learns who signed in

> SAML and OIDC both tell an app who signed in. One sends signed XML, the other a signed token. What each does, the flow, and which to pick for new apps.

- URL: https://iamops.dev/saml-vs-oidc-how-an-app-learns-sign-in/
- Language: en
- Author: Argo
- Published: 2026-11-29
- Category: Knowledge
- Depth: Explainer
- Audience: Security leaders and architects
- Time: 5 min
- Topics: SAML, OIDC, Single sign-on, Identity basics

## TL;DR

- The older standard, Security Assertion Markup Language, sends a [signed Extensible Markup Language (XML) document](https://iamops.dev/saml-vs-oidc-how-an-app-learns-sign-in/#the-saml-flow) through the user's browser after sign-in.
- The newer standard hands the app a [signed token](https://iamops.dev/saml-vs-oidc-how-an-app-learns-sign-in/#how-oidc-differs-on-the-wire) on a direct call, so the token does not have to travel through the browser's address bar.
- Both let an app trust a login server, and both fail badly if the app skips the [signature check](https://iamops.dev/saml-vs-oidc-how-an-app-learns-sign-in/#the-saml-flow).
- For a new app pick the newer standard, and keep the older one only where [a vendor offers no alternative](https://iamops.dev/saml-vs-oidc-how-an-app-learns-sign-in/#which-to-pick).

**Audience: Beginners.** You have seen both names in a vendor screen, and you want to know what the difference means for your app.

Two standards answer one question for an app: who just signed in? Security Assertion Markup Language, or <abbr title="Security Assertion Markup Language">SAML</abbr>, version 2.0 became a standard of the <abbr title="Organization for the Advancement of Structured Information Standards">OASIS</abbr> consortium in 2005. OpenID Connect, or <abbr title="OpenID Connect">OIDC</abbr>, was finished in 2014 and builds on <abbr title="Open Authorization">OAuth</abbr>. Both are still in use, and both let the app trust a login server instead of holding passwords itself.

Before you start: read the [OpenID Connect explainer](https://iamops.dev/openid-connect-explained/) for the newer flow. This article compares it with the older one.

## Two protocols, one job

Think of a boarding letter and a boarding pass. The letter is a sealed paper document from the airline. The gate agent checks the seal against a signature the airline has on file. The boarding pass is a small card that a phone reads and checks against a key the airline publishes. Both get you on the plane. They differ in format, and in what the gate has to check.

SAML is the letter. OIDC is the pass.

## The SAML flow

In SAML the app is called the service provider, and the login server is the identity provider. The app sends the browser to the identity provider with a request. The user signs in there, with a password and a second factor if the company requires one. The identity provider then sends a signed <abbr title="Extensible Markup Language">XML</abbr> document back to the app through the browser. That document is the assertion. It names the user and says when it is valid.

The app checks the signature with the certificate it registered for the identity provider. Then it checks the time window and the audience. Only then does it sign the user in.

The flow below shows that exchange. The red step is the one that decides whether the app trusts anything at all.

![Three actors: the user's browser, the app and the identity provider. The browser sends the user to sign in, the identity provider posts back a signed XML assertion, and the app refuses it if the signature or time is wrong.](https://iamops.dev/img/saml-vs-oidc-how-an-app-learns-sign-in.svg)

*The browser carries the message. The app trusts the signed document and nothing else, so the check has to be right.*

XML is flexible, and that made signature checks harder to get right. SAML libraries have a long record of bugs in that part. The safe habit is to use a maintained library, keep it updated, and test that a forged or expired assertion is refused.

## How OIDC differs on the wire

OIDC runs on OAuth. The app sends the browser to sign in and gets back a short code. The app then exchanges that code on a direct call to the identity provider and receives an <abbr title="identifier">ID</abbr> token. The ID token says who the user is. The app checks its signature, and then it knows the user.

Because the token comes back on that direct call, it does not have to travel in the browser's address bar. A web app makes the call from its server. Mobile and single-page apps make it themselves and protect the code with an extension called <abbr title="Proof Key for Code Exchange">PKCE</abbr>, which is one reason OIDC suits them. For calls to an <abbr title="application programming interface">API</abbr>, the app also gets an access token, which is a separate token with a separate job.

## Side by side

| Property | SAML 2.0 | OIDC |
| --- | --- | --- |
| What the app receives | Signed XML assertion | Signed ID token |
| Built on | Its own protocol | <abbr title="Open Authorization">OAuth</abbr> 2.0 |
| Usual fit | Older enterprise apps, partner links | Web apps, mobile apps, APIs |
| Access for an API | Not part of the design | Access tokens are part of the design |

## Which to pick

For a new app or a new API, pick OIDC. For an older enterprise application that only speaks SAML, keep SAML until the vendor offers OIDC, and plan the move. Avatier's 2026 assessment says the same thing: SAML still carries legacy enterprise single sign-on and business partner links, while OIDC is the better choice for new builds.

When you talk to a vendor, ask three things. Which checks run on the assertion or token. Whether it accepts only the certificate or key you registered. And how it handles an expired or replayed message.

## Where to go next

- [OpenID Connect explained](https://iamops.dev/openid-connect-explained/): the sign-in flow in detail, with the ID token.
- [Access, refresh and ID tokens](https://iamops.dev/access-refresh-id-tokens-explained/): why the ID token and the access token are different things.
- [<abbr title="multi-factor authentication">MFA</abbr> types and passkeys](https://iamops.dev/mfa-types-passkeys-explained/): the second factor that the identity provider checks before it sends anything back.

## Sources

- [OASIS, Security Assertion Markup Language (SAML) 2.0 Core](https://docs.oasis-open.org/security/saml/v2.0/saml-core-2.0-os.pdf)
- [OpenID Foundation, OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1_0.html)
- [Avatier, Is SAML 2.0 Still Relevant? An Honest 2026 Assessment](https://credentialgovernance.avatier.com/en/blog/is-saml-2-0-still-relevant-2026)

Discuss: [X](https://x.com/iamopsdev) | [LinkedIn](https://www.linkedin.com/company/iamops-dev/)
