# SAML and Enterprise Single Sign-On

> Understand SAML-based SSO so your product can plug into corporate identity providers. Free notes, key concepts, resources and a mini project.

Canonical: https://www.internhack.in/roadmaps/tracks/backend/saml-enterprise-sso
Last updated: 2026-11-28

Understand SAML-based SSO so your product can plug into corporate identity providers.

Advanced · about 4 hours · difficulty 4/5

Learn first: [OAuth 2.0 and OpenID Connect](https://www.internhack.in/roadmaps/tracks/backend/oauth2-oidc)

**SAML 2.0** is an XML-based standard for single sign-on that predates OIDC and is still the norm in large companies. When a business customer says "we need SSO with Okta or Microsoft Entra ID", they often mean SAML (or OIDC).

### How it works

- The **Identity Provider (IdP)**, such as Okta or Entra ID, authenticates users.
- Your app is the **Service Provider (SP)**.
- The user is redirected to the IdP, logs in, and the IdP posts a **signed SAML assertion** (XML) back to your app's Assertion Consumer Service URL. You verify the signature and read attributes like email and groups.
- Configuration is exchanged via **metadata** XML documents containing URLs and certificates.

### Related enterprise features

**SCIM** for automatically provisioning and deprovisioning users, and mapping IdP groups to your app's roles.

### Practical advice

Do not hand-roll SAML parsing; XML signature validation has a long history of vulnerabilities. Use a mature library or an identity platform that supports SAML for you.

You are ready to move on when you can configure a free developer IdP account to log into a sample app via SAML and explain what is inside the assertion.

## Key concepts

- **Identity Provider vs Service Provider**
- **SAML assertions and signatures**
- **SP and IdP metadata**
- **SCIM provisioning**
- **Okta and Microsoft Entra ID**

## Mini project

Integrate a sample app with a free Okta or Auth0 developer tenant using SAML, and map an IdP group to an admin role in your app.

## Check yourself

Why is writing your own SAML signature validation a bad idea?

## Free resources

- [SAML (Wikipedia)](https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language) (Wikipedia)
- [OASIS SAML technical overview](https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html) (OASIS)

Previous: [OAuth 2.0 and OpenID Connect](https://www.internhack.in/roadmaps/tracks/backend/oauth2-oidc) · Next: [Authorization: Roles and Permissions](https://www.internhack.in/roadmaps/tracks/backend/authorization-models)

## More in Who Is Calling and What Can They Do

- [Sessions and Cookies](https://www.internhack.in/roadmaps/tracks/backend/sessions-cookies)
- [Token-Based Auth and JWT](https://www.internhack.in/roadmaps/tracks/backend/token-auth-jwt)
- [OAuth 2.0 and OpenID Connect](https://www.internhack.in/roadmaps/tracks/backend/oauth2-oidc)
- [SAML and Enterprise Single Sign-On](https://www.internhack.in/roadmaps/tracks/backend/saml-enterprise-sso)
- [Authorization: Roles and Permissions](https://www.internhack.in/roadmaps/tracks/backend/authorization-models)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Backend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/backend)
