The SAML vs OIDC question usually turns up inside a security questionnaire. A large prospect liked the demo, and their security team now wants single sign-on (SSO) with their identity provider (IdP), automatic provisioning and deprovisioning of users, and audit logs of who signed in and what admins changed. Your product has an email field, a password field and a reset link.
That leaves two decisions, and they come in order. The first is the sign-on protocol, because it shapes the login flow, the libraries you'll depend on and what each customer's IT team has to configure on their side. The second is SCIM, which keeps the accounts inside your product in step with the customer's directory long after the first login.
What is the difference between SAML and OIDC?
Both protocols let a person sign in to your app with an account that lives in their company's IdP, so either one gives you SSO. SAML 2.0 is the older standard and exchanges signed XML assertions through the browser, while OpenID Connect (OIDC) is a JSON-based identity layer on top of OAuth 2.0 that hands your app an ID token.
| SAML 2.0 | OIDC | |
|---|---|---|
| Format | XML assertions | JSON claims; the ID token is a JWT |
| Transport | Browser bindings, mainly HTTP Redirect and HTTP POST | Browser redirect to the authorization endpoint, then the code is exchanged at the token endpoint |
| Token | Signed SAML assertion | ID token (JWT), usually with an OAuth 2.0 access token |
| Typical use | Enterprise web apps and workforce SSO | Modern web apps, SPAs, mobile apps and APIs |
| Mobile and SPA fit | Weak, because it relies on the browser to broker the flow | Good; native apps use the system browser (RFC 8252) |
| Standard body | OASIS | OpenID Foundation (built on IETF OAuth 2.0) |
OASIS describes SAML in its SAML 2.0 technical overview as "an XML-based framework for describing and exchanging security information between on-line business partners." The information itself travels as "portable SAML assertions." The assertion reaches your app through the user's browser, either in a redirect or inside an HTML form that the browser posts. That's why Okta's SAML guide says SAML "relies on using the browser agent to broker the authentication flow." It works well for a web app and gets awkward in a native mobile app or a single-page app.
OIDC was built for those cases. OpenID Connect Core defines the ID token as a JSON Web Token, and in the authorization code flow "all tokens are returned from the Token Endpoint," so your server collects them in a direct back-channel call instead of reading them out of a browser form. For mobile, RFC 8252 says that OAuth requests from native apps "should only be made through external user-agents, primarily the user's browser," and because OIDC runs on OAuth 2.0, a native app's OIDC login fits that pattern as long as the app sends it through the system browser.
Microsoft's single sign-on overview gives software vendors the trade-off in two short sentences: "OIDC is usually simpler to build with modern frameworks. SAML offers broader enterprise compatibility."
Is OIDC the same as OAuth 2.0?
No. OAuth 2.0 is an authorization framework, and OIDC is the identity layer that sits on top of it.
RFC 6749 defines OAuth 2.0 as a framework that lets a third-party application get limited access to an HTTP service. That's delegation. Your app receives an access token so it can call an API on the user's behalf, and the token describes what the app may do, not who the person is. The OpenID Connect spec is direct about the gap: OAuth 2.0 and its bearer token spec "define mechanisms to obtain and use Access Tokens to access resources but do not define standard methods to provide identity information."
OIDC fills that gap. In the spec's own words, it's "a simple identity layer on top of the OAuth 2.0 protocol." Its addition is the ID token, which is issued to your app and carries claims about the sign-in itself. So the OIDC vs OAuth question has a short answer: OIDC is OAuth 2.0 plus a standard, verifiable statement of who signed in.
It also explains why SAML vs OAuth is a mismatched comparison. SAML is a sign-on protocol, and OAuth 2.0 grants access to APIs, so for login the real choice is SAML vs OIDC. Building "Sign in with OAuth" on a bare access token is a mistake for the same reason. The token tells your API that someone granted access, but it doesn't give your app a standard way to know who that person is, which is exactly what a login has to establish.
Which should a new SaaS product support first?
Let the deals in your pipeline decide, and plan to support both. If the customers you're about to sign run IdPs that offer both protocols, OIDC is usually the quicker one to build. SAML is the one many enterprise IdP admins expect, though, so a product that ships OIDC alone can still get asked for SAML by the very next prospect.
So find out which IdP each enterprise prospect runs and what its security team has written down. If a prospect's requirements only mention SSO SAML support, that settles the order for you. Whichever protocol comes first, design the per-customer connection so it can hold either one, since adding the second protocol to a model built for two is a smaller job than reworking a model that assumed one.
And don't hand-roll either protocol. SAML responses are signed XML, and checking XML signatures correctly is harder than it looks, which is why Okta's advice is plain: "The easiest way to implement SAML is to use an open-source SAML toolkit." The same holds for OIDC. A tested library or a managed identity service does the token validation you'd otherwise have to write and maintain yourself.
What is SCIM?
SCIM (System for Cross-domain Identity Management) is an HTTP-based protocol, defined in RFC 7643 and RFC 7644, that lets a customer's identity provider create, update, deactivate and delete users and groups in your app through a standard REST API and schema. Access in your product then follows the customer's directory, and with it the HR record.
Where does SCIM fit next to SSO?
SSO decides how a person signs in. SCIM decides whether their account exists in your app and whether it's active.
The difference shows on someone's last day. The customer's IT team disables the leaver in the IdP, and SSO stops letting them in at their next sign-in attempt. Their account in your app is still there, though. If it stays active, an open session or an API token the person created can keep working, and nobody at the customer can see that from their side. SCIM provisioning closes the gap because the IdP sends the change to your app without waiting for anyone to sign in, and your app acts on it by blocking the login, ending open sessions and revoking the person's tokens.
RFC 7644 describes SCIM as "an application-level HTTP-based protocol for provisioning and managing identity data." Its core is two resource endpoints, which Microsoft's SCIM endpoint tutorial lists as "a /Users endpoint and a /Groups endpoint."
Deactivation usually arrives as a change to the active attribute. RFC 7643 calls it the user's administrative status, where true typically means the user can log in and false means the account is suspended. The spec leaves the exact meaning to the service provider, so your app decides what false does. A safe choice is to block the next login and also end open sessions and revoke tokens. Groups follow the same pattern: the IdP pushes membership to /Groups, and your app maps those groups to roles.
Our identity and access management development for security companies "covers SSO over SAML and OIDC" and SCIM as well, "so accounts open and close when the HR record changes."
JIT provisioning or SCIM?
Just-in-time (JIT) provisioning is the lighter option. Your app creates the account the first time someone signs in, using the attributes in the SAML assertion or the claims in the ID token, and Microsoft's app provisioning overview lists "SAML just-in-time (JIT)" as one way to automate provisioning. The main difference is timing. JIT acts when a person signs in, while SCIM acts when the directory changes.
| JIT provisioning | SCIM provisioning | |
|---|---|---|
| Creates users | At the user's first sign-in, from the assertion or ID token | When an admin assigns the user in the IdP, before any sign-in |
| Updates users | At the next sign-in, if your app reads the attributes again | When the record changes in the IdP |
| Removes users | Depends on the IdP and on your app | The IdP sets active to false or deletes the user |
How does SSO map roles?
Role information reaches your app in one of two ways. It comes with the sign-in, as attributes in a SAML assertion or claims in an OIDC ID token, or it comes through SCIM as group membership. Either way the names belong to the customer. One customer's "Engineering-Admins" group is another customer's "app-owners", so the mapping from their groups to your roles has to be configurable per customer.
Give users who arrive without a matching group a default role, and make it the least-privileged one you have. A mapping mistake that locks someone out costs a support ticket, while one that lets someone in is a security incident.
Then decide who owns role assignment. If the IdP owns it, your app's admin screen shouldn't let anyone change a role that the next sync will overwrite. If your app owns it, the IdP only creates the user and your own admins set the role.
What do enterprise buyers ask for in a security review?
The requests below tend to come as a set. Wording varies from one questionnaire to the next, and this is a typical list, not a standard:
- SSO with their IdP, over SAML, OIDC or both, configured for their company alone.
- SSO-only enforcement, so their users can't fall back to a password on your login page.
- SCIM provisioning and deprovisioning that follows their directory.
- Role or group mapping that lets their groups decide what each user can do.
- MFA enforced by their own IdP, which only holds once the password path is closed.
- Audit logs of sign-ins and admin changes that their security team can review.
- Session timeouts, plus token revocation when an account is turned off.
What do Okta and Microsoft Entra ID support?
Both support SAML and OIDC for sign-on and SCIM for provisioning, so one standards-based implementation can serve customers on either IdP, though each one still needs its own setup and its own round of testing. Entra ID's SAML protocol reference covers the requests and responses it accepts for SSO, and Microsoft's OpenID Connect documentation describes how its identity platform uses OIDC for sign-in. On provisioning, the SCIM tutorial says Entra can "quickly automate both provisioning and deprovisioning of users and groups" for apps that implement SCIM 2.0.
Okta's developer documentation covers SAML integration, and its OAuth 2.0 and OpenID Connect overview states that "Okta is OpenID Certified." Its SCIM guide describes "a defined schema for representing users and groups, and a RESTful API to run CRUD operations" on them. With its Lifecycle Management in place, "Inactive employees are automatically deactivated from their apps." Each IdP also publishes its own requirements for apps listed in its integration catalog, and those are worth reading before you start building.
How do you add SSO and SCIM to a SaaS product?
Build it in this order, and test each part against a real IdP as you go.
- List the IdPs your current and next enterprise prospects use, and note what each prospect's questionnaire asks for.
- Choose the protocol order (OIDC, SAML or both) and a tested library or identity service for each one.
- Add a per-customer SSO connection that stores the IdP metadata or OIDC discovery URL, the signing certificates and the redirect URIs.
- Route each login to the right customer. Our multi-tenant guide explains how to route each login to the right tenant.
- Map attributes or claims to your users and roles, and decide whether to create users just in time on their first sign-in.
- Build the SCIM endpoint (/Users, /Groups and deactivation through
active) and test it against the IdPs from step 1. - Add SSO-only enforcement per customer, audit logs of sign-ins and admin changes, and session and token revocation when a user is deprovisioned.
- Write a setup guide for the customer's IT team, and run the whole flow against a real IdP tenant before the security review begins.
Timing matters as much as order. Our SaaS product development service says planning SSO and SCIM "should happen before the first enterprise deal reaches security review," because "SAML/OIDC SSO, SCIM provisioning and audit logging add scope, and enterprise buyers often require them before they sign."
Where this shows up in practice
The points above also appear in the technical scope our case studies describe. Brokering is one way to hold either protocol per connection: a shared application authentication service keeps existing directory connections in use, and "brokering widens that choice to another OpenID Connect or SAML provider." Both protocols can also sit next to older ones, as in the configurable identity and access platform, which "supports OpenID Connect and OAuth2 for modern web clients" and "also speaks SAML and LDAP for directory and enterprise sign-on, with proxy authentication or RADIUS for older clients."
The customer's groups reach the app through role mapping in a private media library, where "SAML role mapping carries organisational access across." And OIDC for apps, with MFA in the same sign-in path, is the setup in a clinical data system integration: "The apps sign in through OAuth2 and OpenID Connect, with SMART on FHIR and multifactor support in place."
Schools are another sector where both protocols appear. As our education page puts it: "For sign-on we use SAML or OIDC. In many K-12 districts that ends up meaning Clever or ClassLink."
If you're still deciding who should build this, our guide on how to choose a SaaS development partner covers what to ask before you sign.
Frequently asked questions
Does SSO replace MFA?
No. SSO moves MFA to the customer's IdP, which can require it through policy; Microsoft's Conditional Access has a grant control called "Require multifactor authentication." Your app still has to protect any login path that skips SSO, such as a password login kept for your own admins or for customers who don't have an IdP.
Should we build SAML or OIDC first?
Ask before you build. The customer's IT admins, or the security questionnaire they send, will usually say which protocol they want, so check that for each enterprise deal in your pipeline first. If the answers are split, the section above on which protocol to support first covers how to set the order.
Do we need both JIT provisioning and SCIM?
Supporting both is a reasonable default. JIT gets a customer running before they've set up provisioning, since accounts appear at first sign-in. SCIM keeps accounts in step with the directory afterwards, including removals, without waiting for anyone to sign in. A buyer who asks for deprovisioning is usually asking for SCIM.
Is "Sign in with Google" enterprise SSO?
Usually not. A generic "Sign in with Google" button is social login, which lets anyone with a Google account sign in, so your app has to work out which company each person belongs to. Enterprise SSO is a connection the customer configures to their own IdP, so their admins decide who gets in and their policies, MFA included, apply.
Can SCIM work without SSO?
Technically, yes. SCIM manages accounts and SSO manages sign-in, and neither protocol requires the other. They're normally deployed as a pair, though: Microsoft describes SCIM used with SAML or OpenID Connect as "an end-to-end, standards-based solution for access management." Without SSO, the users SCIM creates would still need another way to sign in.
Planning SSO and SCIM for your product
If an enterprise questionnaire is asking for SSO and SCIM, a discovery call is a sensible place to start. We'll go through the IdPs in your pipeline and where your login and account model stand today.
Buttons: "Book a Technical Discovery Call" → /contact · "Get a Project Estimate" → /project-estimate