Skip to content

Blog

SAML vs OAuth: which one does what

SAML vs OAuth: SAML logs people in, OAuth lets one app act for you inside another. The difference in plain terms, with examples from tools you use.

· 9 min read

SAML vs OAuth comes down to one line: SAML logs a person in, and OAuth lets one app act for a person inside another app. SAML answers "who is this?" so a tool can open a session. OAuth answers "what is this app allowed to do with my account?" so, say, Zoom can read your Google Calendar without ever seeing your Google password.

The two get compared because both involve redirects, tokens and the word "sign in". They solve different problems, and most businesses use both every day without knowing it.

The short answer: authentication vs authorization

Authentication is proving who you are. SAML is an authentication protocol. Authorization is granting permission to do something. OAuth 2.0 is an authorization framework; its standard, RFC 6749, is literally titled "The OAuth 2.0 Authorization Framework".

A useful test: if the result is "you are now logged in to this tool", it is authentication. If the result is "this app can now read your files", it is authorization.

SAMLOAuth 2.0
JobLog a person in to a toolGive an app limited access to another app's data
AnswersWho is this person?What may this app do, and for how long?
What gets issuedA signed assertion about the personAn access token with scopes
FormatXMLUsually JSON; the token format is up to the provider
Typical placeWorkplace SSO into Slack, GitHub, Jira"Connect your calendar", "Allow access to Google Drive"
Who sets it upAn admin, once per toolOften each user, by clicking Allow

The dates tell the same story. SAML 2.0 was approved by OASIS in March 2005, when the problem was employees logging in to web-based business software. OAuth 2.0 was published by the IETF in October 2012, when the problem was apps connecting to other apps' APIs on a user's behalf.

SAML: proving who you are to a tool

With SAML, your identity provider (Google Workspace, Okta, Microsoft Entra ID) signs a message that says "this is Ana, and she authenticated just now". Her browser carries that message to the tool, the tool checks the signature, and Ana is in. The tool gets a name and an email, not a key to anything else. What SAML is walks through it step by step, including what sits inside the assertion.

SAML is set up by an admin, once per tool, and it is usually only available on a tool's Business or Enterprise plan. Ana never sees a consent screen. Her company decided on her behalf that this tool trusts this identity provider.

OAuth: letting an app use your data

With OAuth, you are not logging in to the app that asks. You are telling another service, where your data lives, to give that app a limited key.

When you click "Connect Google Calendar" in Zoom, Zoom sends you to Google. Google shows a consent screen: "Zoom wants to see and edit your calendar events." You click Allow. Google gives Zoom an access token that works for those calendar actions only, and that you can revoke from your Google account at any time. Zoom never sees your Google password, and it cannot read your email because you did not grant that scope.

The token is the point. It is scoped (only calendar), it expires, and it can be withdrawn.

RFC 6749 names four roles, and they map neatly onto that example. You are the resource owner, the one who can grant access. Google Calendar is the resource server, where the data lives. Zoom is the client, the app asking for access. Google's login and consent service is the authorization server, which checks who you are and issues the token. Notice that the spec leaves how the authorization server checks who you are out of scope. OAuth assumes someone logged you in; it is not the part that does it.

The spec also defines four grant types, the ways an app can get a token: authorization code, implicit, resource owner password credentials and client credentials. The first is what you meet in the "Allow access" flow. The last is for one server talking to another with no person involved at all, which is the clearest sign that OAuth is about access, not about people.

Where they meet: OIDC on top of OAuth

OAuth on its own does not say who the user is; it only grants access. People used it for login anyway, inconsistently, so the industry built OpenID Connect (OIDC) on top of it, with OpenID Connect Core 1.0 published in February 2014. OIDC adds an ID token: a signed statement of who the user is, in a standard format.

So "Sign in with Google" on most apps is OIDC, which is OAuth plus a standard identity layer. That makes OIDC a real alternative to SAML for single sign-on. What OIDC is explains the ID token, and SAML vs OIDC compares the two login standards directly. If you want all the things called SSO on one page, types of SSO lines them up.

This is also why "SAML vs OAuth" is a slightly unfair fight. The fair login comparison is SAML against OIDC. OAuth is the plumbing underneath one of them.

Examples: SSO into Slack vs connecting a calendar to Zoom

Four everyday cases cover most of what a small business sees.

Logging in to Slack through Okta at a company that has set up SSO is SAML. An admin configured it once; nobody clicks Allow.

Clicking "Sign in with Google" on Figma or Notion is OIDC, which runs on OAuth. The person logs in, and the tool learns their email and name.

Connecting Google Calendar to Zoom or Calendly is plain OAuth. Nobody is logging in to anything; Zoom is being given access to calendar data.

Authorizing a GitHub OAuth app on your account is OAuth too. The app gets permission to act on your repositories; nobody is logged in to anything new.

The quick way to tell them apart in the moment: a consent screen that lists permissions ("see and edit your calendar") means OAuth. A login that just happens, with no list of permissions, is SAML or OIDC.

Which is more secure?

Neither, as a rule. Both are mature, widely reviewed standards, and both are only as safe as their setup. SAML problems tend to come from loose signature checking and certificates nobody rotates. OAuth problems tend to come from apps asking for far more scope than they need, and users clicking Allow without reading.

For a small business, the practical OAuth risk is the second one: old integrations with broad access that nobody remembers granting. A former employee's calendar plugin, a free PDF tool someone tried once with "read and write all your Drive files". Those grants are a quiet kind of shadow IT, and nobody thinks of them when the person who clicked Allow leaves. Offboarding has to cover them too.

Is "Sign in with Google" OAuth or SAML?

Neither exactly. It is OpenID Connect, which runs on OAuth 2.0. When you click it, the tool sends you to Google with a request that includes the openid scope, Google logs you in, and the tool gets back an ID token naming you. If the consent screen also asks for something like "see your calendar", the same flow hands the tool an OAuth access token as well. One click, two jobs: identity through OIDC, access through OAuth.

Google Workspace can also act as a SAML identity provider, for tools an admin adds as SAML apps in the Admin console. So the same Google account can log people in through SAML in one tool and through OIDC in the next. Your people will not notice which is which.

What to do this week

You do not need to choose between SAML and OAuth. You need to know where each one is already in use.

List your SAML connections. For most small companies that is a short list, often empty, and it tells you which tools already enforce login through your identity provider.

Then look at OAuth grants. In Google Workspace's admin console, check which third-party apps have access to company data and how broad that access is. Remove anything nobody can explain.

Finally, turn on "Sign in with Google" or "Sign in with Microsoft" wherever a tool offers it on your current plan, and make sure MFA is enforced on the accounts behind it. That costs nothing and gets you most of the everyday benefit of single sign-on.

Can OAuth replace SAML?

Not OAuth on its own, because it does not identify anyone. OpenID Connect, built on OAuth, can do the same job as SAML for single sign-on, and many newer tools offer it. Whether you can use it depends on what each tool supports for enforced login, and many business tools still only offer SAML there. You do not get to pick per tool; the tool picks.

Which one a small business deals with, and when

You deal with SAML when you set up workplace SSO, and when a tool puts that SSO on its Enterprise plan. That is where the SSO tax comes from.

You deal with OAuth every time someone connects one tool to another. It is worth reviewing those connections now and then, especially in Google Workspace's admin console, where you can see which third-party apps have access to company data. Our Google Workspace security checklist includes that review.

You deal with OIDC whenever people use "Sign in with Google" or "Sign in with Microsoft", which many tools offer on every plan, for free. That is the cheapest SSO-like experience available. It is not enforced, so it does not stop someone using a password account instead, but it is a sensible default while you decide whether paying for SAML is worth it. What SSO is covers that decision.

Where SmashSSO fits

SmashSSO is neither a SAML identity provider nor an OAuth app that logs people in. It does not change how anyone signs in.

It handles who has an account in each tool: it reads your people from Google Workspace with read-only access, shows who already has access to each tool and with what role, and invites, changes and removes people for you. Where a tool has a member API, you can give it a token and it uses that; otherwise an agent does the job in your own Chrome, in tabs where you are already signed in as an admin. That browser has to be open, and agent runs can fail when a tool changes its screens. It costs a flat fee from $199 a month billed annually (pricing). See how it works and the limits on the security page.

FAQ

Is OAuth used for SSO?
Not on its own. OAuth grants an app permission to access data; it does not say who the user is. OpenID Connect adds that identity layer on top of OAuth, and OpenID Connect is widely used for single sign-on.
Can OAuth replace SAML?
OpenID Connect, which is built on OAuth, can do the same job as SAML for single sign-on, and many newer tools offer it. Whether you can use it depends on each tool, and many business tools still only offer SAML for enforced SSO.
Is "Sign in with Google" OAuth or SAML?
Neither exactly: it is OpenID Connect, which runs on OAuth 2.0. Google Workspace can also act as a SAML identity provider for apps an admin adds in the Admin console.
Which is more secure, SAML or OAuth?
Neither is more secure as a rule; they do different jobs and both are mature standards. The common risks differ: for SAML, loose signature checks and certificates nobody rotates; for OAuth, apps granted far broader access than they need.

Keep reading

Stop paying for a login button.

Sign in with Google Workspace, connect your tools, and see who has access to what in minutes.

Sign up with Google