An employee joins a company and needs access to a dozen applications: email, CRM, HR, support tools, analytics. Without a standard, that is twelve registrations, twelve passwords, twelve reset flows, and twelve places where a departing employee's access lingers. With SAML, it is one login — at the company's identity provider — and every application vouched for automatically.
SAML (Security Assertion Markup Language) has run enterprise single sign-on since the early 2000s, and despite its age and its verbose XML format, it remains the default answer to "does your product support enterprise SSO?" It solves a precise problem — one system's authentication, provable to another system — and its flow, once you have seen it step by step, is more intuitive than its reputation suggests.
The Problem: Vouching Between Systems
A web application cannot simply ask a company's internal login system "is this user real?" — the two systems share nothing by default: no user database, no trust, no common protocol. Building a custom integration per application per company does not scale, and shipping passwords between systems is unacceptable.
What the application needs is a signed statement: "I have authenticated this person, here is who they are, and here is proof that I say so." An application can trust that statement without sharing a password database, because the signature is checkable against a public key — the same trust model as a digital certificate. SAML standardizes the statement, the signature, and the exchange.
The Three Actors: User, IdP, SP
The user is the person with a browser. The identity provider (IdP) is the authoritative authenticator — Okta, Microsoft Entra ID, Google Workspace, Keycloak — which holds user accounts, enforces policies like multi-factor authentication, and issues assertions. The service provider (SP) is the application the user wants to reach, which consumes assertions instead of managing passwords.
The trust relationship is set up once, out-of-band: the SP and IdP exchange metadata containing each other's entity IDs, endpoints, and — crucially — public keys for signature verification. After that handshake, no shared secret exists between them; trust is entirely signature-based. This is the same asymmetric pattern underlying TLS and PKI: private keys sign, public keys verify, and no secret ever crosses the wire.
The SAML Flow, Step by Step
The most common flow is SP-initiated. Walk through it:
One: the user visits the application — say, Salesforce. Two: the SP has no session for this browser, so instead of showing a login form, it generates a SAML authentication request and redirects the user's browser to the IdP's SSO URL, carrying the request. Three: the IdP receives the request, checks whether the user already has a session there — and if not, presents its own login page with whatever policies apply (password, MFA, device checks). Four: authenticated, the IdP constructs a SAML assertion — an XML document stating who the user is, when authentication occurred, and often attributes like email and role — and signs it with its private key. Five: the assertion reaches the SP, typically via the browser as a POST to the SP's assertion consumer service (ACS) URL. Six: the SP verifies the signature against the IdP's public key, checks the assertion's conditions — recipient, timestamps, audience — and, if everything verifies, creates a local session for the user. Seven: the user is in.
The user experiences: click app, maybe a brief redirect blink, done. Everything else — the vouching, the signing, the verification — happens in that blink. IdP-initiated flows reverse the direction (start at the company dashboard, click an app icon, get posted to the app with an assertion), but the trust mechanics are identical.
Inside an Assertion
A SAML assertion carries three kinds of statements, and the authentication statement is the one that matters most for SSO: it says who was authenticated, how (password, MFA), and when. Attribute statements carry identity data — email, department, groups — which the SP can map to roles and permissions. Authorization statements exist in the spec but are rarely used in practice; applications handle permissions themselves.
Around the statements sit the conditions that make the assertion safe to consume: a not-before and not-on-or-after window (assertions expire within minutes — replay protection), an audience restriction (this assertion is only valid for this specific SP), and a unique ID the SP tracks to reject duplicates. The XML is verbose, but every field answers a specific attack: replay, audience confusion, timing abuse. Modern implementations wrap assertions in signed responses with redirect or POST bindings — and correct signature verification, including checking what was signed rather than trusting unverified parts of the document, is where historical SAML vulnerabilities have concentrated. Libraries matter here; hand-rolled XML signature handling has a poor track record.
SAML vs OAuth vs OpenID Connect
The comparison confuses people because the three overlap in casual usage but occupy different layers.
SAML is an identity federation protocol: XML-based, browser-redirect-centric, built for web SSO between organizations. OAuth 2.0 is an authorization framework: it lets a user grant an application limited access to their resources — designed for API delegation, not for proving identity (despite being widely abused for it). OpenID Connect is an identity layer on top of OAuth 2.0 — JSON-based, mobile-friendly, and the standard for consumer and modern application SSO ("Sign in with Google" runs OIDC).
The practical division: enterprises connecting internal tools and SaaS vendors choose SAML — it is what enterprise applications support, and IdP ecosystems are built around it. Consumer sign-in and mobile apps choose OIDC. Delegated API access chooses OAuth. They coexist; many organizations run SAML for workforce SSO and OIDC for their public-facing apps, with the IdP bridging both.
Why Enterprises Standardize on It
The value case is organizational, not just technical. Security concentrates at one point: MFA, conditional access, and session policies apply uniformly to every connected app, and a compromised app never sees a reusable password — it only ever sees assertions. Deprovisioning becomes atomic: one IdP deactivation ends access everywhere, eliminating the orphaned-account problem that leaks data years after departures. Auditing centralizes: the IdP logs who accessed what, when, satisfying compliance requirements that per-app logs never could. And usability improves — one credential instead of twelve, which in practice means users stop reusing weak passwords across company tools. SSO is one of the rare security controls that users experience as a gift rather than a tax, which is why adoption is near-universal in the enterprise.
Try It Yourself
You can see the trust mechanics that make SAML work — signing and verification — without any SAML infrastructure. The NovelCrypt digital signer signs a document with a private key and verifies it with the corresponding public key: the exact operation an identity provider performs on every assertion. And our JWT security guide covers the token-based cousin of SAML assertions — the same signed-statement pattern, in JSON, powering modern API authentication.
The Bottom Line
SAML is the protocol that lets an identity provider vouch for a user to a service provider through signed XML assertions — authentication stated once, verified by signature, trusted without shared secrets or shared passwords. The flow is a redirect dance the user experiences as one click, and the trust model is the same asymmetric signing that underlies certificates. It dominates enterprise SSO because it solves the organizational problems — centralized policy, atomic offboarding, uniform auditing — that individual app passwords cannot. Modern alternatives like OpenID Connect serve consumer and mobile spaces, but for business-to-business single sign-on, SAML remains the standard that everything else is measured against.