# Security Assertion Markup Language (SAML)

> An XML standard for single sign-on. A signed note tells the app who you are.

**Field:** Software Development  
**Category:** Auth  
**Also known as:** SAML, SAML 2.0, SAML SSO, SAML Assertion

## Think of it like

Think of it like a signed note from the school office. The teacher reads it and lets you in.

## Definition

SAML is an older standard for single sign-on, built on XML. When you open a work app, the app sends you to the identity provider. The provider checks who you are. Then it gives your browser a signed XML note, called an assertion, to post back to the app. The app checks the signature and lets you in. Version 2.0 became a standard in 2005.

## Example

Emma opens Salesforce at work. It sends her to her company's Okta page, where she signs in. Okta posts a signed SAML assertion back, and Salesforce lets her in.

## Example code

```xml
<saml:Assertion Version="2.0" IssueInstant="2026-11-18T09:00:00Z">
  <saml:Issuer>https://idp.example.com</saml:Issuer>
  <ds:Signature>...</ds:Signature>
  <saml:Subject>
    <saml:NameID>emma@example.com</saml:NameID>
  </saml:Subject>
</saml:Assertion>
```

The heart of an assertion. It names who signed it, then who the user is.

## Why it matters

Most big work apps still take SAML. Setting up company sign-in for them often means trading SAML settings with the app.

## Common mistake

Trusting an assertion without checking its signature and who it is for. A copied or changed note must be turned away.

## Three principles

- **A signed note.** The assertion is XML with a signature.
- **Carried by the browser.** Posted from the provider to the app.
- **Made for work apps.** Older than OpenID Connect, still everywhere.

## Related terms

- [Single Sign-On (SSO)](https://learn.benibix.com/term/development/single-sign-on)
- [OpenID Connect (OIDC)](https://learn.benibix.com/term/development/openid-connect)
- [Identity Provider (IdP)](https://learn.benibix.com/term/development/identity-provider)
- [System for Cross-domain Identity Management (SCIM)](https://learn.benibix.com/term/development/scim)
- [Extensible Markup Language (XML)](https://learn.benibix.com/term/development/xml)
- [Digital Signature](https://learn.benibix.com/term/development/digital-signature)

## Told apart from

- [SAML vs OpenID Connect](https://learn.benibix.com/compare/saml-vs-openid-connect): People think SAML and OpenID Connect do different jobs, and they do the same one. Both let one login open many apps. SAML is older and sends a signed XML note through the browser. OpenID Connect is newer, sends a signed JSON token, and suits phone apps and APIs. Most work apps take both.
- [SCIM vs SAML](https://learn.benibix.com/compare/scim-vs-saml): People think SCIM is another way to log in, and it is not. SAML signs a person in, each time they open an app. SCIM works ahead of time, making, changing and removing their accounts in each app. Single sign-on without SCIM can leave a past worker's accounts alive in every app, long after they have gone.

![Two lanes. Top lane, SAML, each time Emma signs in: a work app sends her browser to the identity provider, she signs in, the provider hands her browser a signed assertion, and the browser posts it back to the app. Bottom lane, SCIM, ahead of time: the identity provider sends the work app two messages, make Emma's account and turn off Jack's account, and no one signs in. A note says SAML checks who is at the door and SCIM keeps the guest list right in every app.](https://learn.benibix.com/diagrams/dev-saml-scim.svg)

---

Source: https://learn.benibix.com/term/development/saml
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
