SAML vs OAuth: Sign-In Proof or Permission Slip?
SAML is an authentication standard: it lets an identity provider tell an application who a user is, using a signed XML assertion. OAuth 2.0 is an authorisation framework: it lets a user grant an application limited access to their data elsewhere, without sharing a password. They solve different problems, which is why modern stacks combine them.
- Different verbs. SAML authenticates, proving identity; OAuth authorises, granting permission.
- Different artefacts. SAML hands over a signed assertion about a person; OAuth hands over an access token with scopes.
- OAuth never logs you in. By itself it says nothing standard about who the user is.
- OIDC bridges the gap. OpenID Connect adds identity on top of OAuth, which is where the confusion multiplies.
- Both thrive together. SAML signs staff into apps while OAuth quietly connects those apps behind the scenes.
What problem does SAML solve?
SAML solves the password-per-application problem. Without it, every business app keeps its own accounts, and staff juggle credentials while IT cannot switch access off centrally.
With SAML, the identity provider authenticates the user once and issues an assertion the application trusts. The app learns who you are, plus attributes like department and group membership.
That assertion is an XML document, digitally signed by the provider. The application validates the signature and conditions, then builds its session from the contents.
Our background guide on what is SAML covers the federation model in full. The short version: SAML is about identity, delivered as a signed statement.
SAML also centralises the exit. Disable one account at the identity provider and every federated application refuses the next sign-in, which is why offboarding teams value it.
Federation across companies is its other strength. Partners can trust each other's providers, so a supplier's staff reach your portal with their own credentials.
What problem does OAuth solve?
OAuth solves the password-sharing problem between applications. A reporting tool needs your files, but handing it your storage password gives it everything, forever.
Instead, the storage provider asks you to approve specific scopes, such as reading one folder. The tool receives an access token limited to exactly that permission.
You can revoke the token without changing your password, and the token alone does not reveal who you are. It is a permission slip, not an identity card.
Our walkthrough on how to implement OAuth in web apps shows the grant flow step by step. Notice that no step standardises proving the user's identity to the app.
Scopes are the heart of the design. Reading a calendar is a different grant from deleting it, and OAuth lets the user approve one without the other.
The framework deliberately leaves token format open. Providers issue opaque strings or structured tokens, as long as the resource server can validate what arrives.
Why do people confuse SAML with OAuth?
| Dimension | SAML | OAuth 2.0 |
|---|---|---|
| Primary job | Authentication: who the user is | Authorisation: what an app may do |
| What changes hands | Signed XML assertion | Access token with defined scopes |
| Typical moment | A person signing in to an app | An app connecting to another service |
| Standardised | 2005 (SAML 2.0) | 2012 (OAuth 2.0) |
| User experience | Redirect to provider, sign in once | Consent screen approving permissions |
| Proves identity? | Yes, that is its purpose | No, not by itself |
| Common pairing | Enterprise web SSO | API access and third-party integrations |
The confusion has honest roots. Both involve redirects to a provider, both end with the user inside an application, and from the user's chair the two dances look alike.
Vendors blur things further by marketing OAuth-based sign-in products. When a login button uses OAuth machinery underneath, buyers assume OAuth itself does the authenticating.
Certification syllabuses keep the pair adjacent as well. Both appear in the same identity course, so they are learned together and recalled as siblings ever after.
How do SAML and OAuth differ in what they hand over?
A SAML assertion describes a person: an identifier, attributes, and an authentication statement saying when and how they signed in. Applications read it directly.
An OAuth access token describes a permission. It is often opaque to the application holding it; the resource server validates it and enforces its scopes.
That difference shapes security work. SAML review focuses on signature validation and assertion expiry, while OAuth review focuses on scope breadth and redirect URI discipline.
It also shapes your app inventory. Record which apps federate sign-in through SAML and which hold OAuth grants, because the offboarding steps for each are different.
Audit OAuth grants like accounts. A forgotten token with broad scopes keeps working after the person who approved it has left.
Lifetime handling differs too. Assertions live for minutes and are consumed once, while access tokens may be refreshed and reused across many API calls.
Revocation tells the same story. Killing a session ends SAML access cleanly; a scattered set of OAuth grants must each be found and revoked.
Where does OIDC fit between them?
OpenID Connect sits on top of OAuth and adds the missing identity layer. Alongside the access token, the provider issues an ID token stating who authenticated.
That single addition explains most modern confusion. Teams say OAuth when the stack in front of them is really OAuth plus OIDC doing sign-in duty.
OIDC is why the SAML conversation changed. New applications can now get standardised identity from the OAuth family, a job that once belonged to SAML alone.
If the distinction is still fuzzy, our explainer on single sign-on meaning separates the sign-in experience from the protocols underneath it.
The ID token is a JWT with standard claims, which is why developers find OIDC sign-in data easy to consume compared with parsing an XML assertion.
Discovery completes the modernisation. A provider's configuration document lets applications find endpoints automatically, replacing SAML's manual metadata exchanges.
How are SAML and OAuth used together?
Picture a normal workday. You sign in to the company portal through SAML, open the CRM the same way, then connect a reporting tool to the CRM.
That last step is OAuth. You approve scopes, the reporting tool receives a token, and it pulls CRM data without ever seeing your password or your SAML assertion.
The identity provider often anchors both. It issues SAML assertions for workforce apps and runs the authorisation server that grants OAuth tokens for integrations.
Governance has to cover both paths. Access reviews that check accounts but ignore connected-app grants leave half the access picture unexamined.
Consumer products show the same layering. You sign in with a social account through OIDC, then grant a photo service access to your storage through OAuth.
Mobile apps lean on the combination hardest. One OIDC sign-in establishes identity, then OAuth tokens quietly authorise every API call the app makes afterwards.
Which should you use for sign-in and API access?
For workforce sign-in to established web applications, SAML remains the safe default. It is what enterprise identity providers and SaaS vendors have supported longest.
For application-to-application access, OAuth is the only real candidate of the two. SAML has no concept of a scoped, delegable token for calling an API later.
For new sign-in experiences, especially mobile, evaluate OIDC rather than forcing a SAML-versus-OAuth choice. It was designed to close exactly that gap.
The mature answer is rarely either-or. Run SAML where it fits, OAuth where it fits, and keep one inventory of both so nothing escapes review.
Inventory before ideology. List which of your applications speak which protocol, and the estate itself will tell you the proportions of your future state.
Whatever you standardise on, monitor both. Sign-in logs and grant logs together show who entered, and what the things they connected can still do.
Budget follows the same logic. SAML effort goes on federation housekeeping and certificate care; OAuth effort goes on grant governance and scope review.
New hires feel the difference first. A clean SAML estate gives them every app on day one; a governed OAuth estate keeps that convenience from outliving their role.
When a vendor offers only one, let the application's importance decide. A core system justifies meeting it on its protocol; a minor tool does not.
Sources
Frequently asked questions
Is OAuth an authentication protocol?
No. OAuth 2.0 is an authorisation framework that grants applications limited access to resources. It does not standardise how the user is identified, which is why OpenID Connect was created to add authentication on top of it.
Can OAuth replace SAML for single sign-on?
Not directly, because OAuth alone does not prove identity. OIDC, which extends OAuth, can serve as the sign-in protocol for modern applications, but many established enterprise apps still only support SAML.
What does a SAML assertion contain that an OAuth token does not?
Identity. A SAML assertion states who the user is, attributes such as department or role, and how and when they authenticated. An OAuth access token instead carries permission scopes and may be unreadable to the app holding it.
Why do SAML and OAuth look similar to users?
Both redirect the browser to a provider and return the user to the application. The difference is what comes back: a signed identity assertion with SAML, or an authorisation grant and token with OAuth.
How are SAML and OAuth used together in practice?
Staff sign in to applications through SAML, while those applications connect to each other through OAuth grants. One identity provider commonly anchors both, issuing assertions for sign-in and tokens for integrations.