---
title: "What is SAML? A practical guide to the authentication protocol"
description: "SAML is an XML-based protocol that lets an identity provider such as GSuite, Okta or Active Directory vouch for users to a service provider, enabling enterprise single sign-on."
url: "https://swe.quest/articles/what-is-saml-a-practical-guide-to-the-authentication-protocol-f30f4484140d1d2e"
canonical: "https://supabase.com/blog/what-is-saml-authentication"
source: "Supabase"
published: "2024-01-17"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["identity-auth","postgres"]
---

# What is SAML? A practical guide to the authentication protocol

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2024-01-17, 7 min read, How-to. Original: [https://supabase.com/blog/what-is-saml-authentication](https://supabase.com/blog/what-is-saml-authentication)

## Summary

SAML is an XML-based protocol that lets an identity provider such as GSuite, Okta or Active Directory vouch for users to a service provider, enabling enterprise single sign-on. Before SSO works, both sides exchange X.509 certificates, entity IDs, ACS/SLO/redirect URLs and attribute mappings, mostly via SAML Metadata XML documents, though allowed email domains and attributes still need manual agreement. Both SP-initiated and IdP-initiated flows are covered, followed by Supabase's signInWithSSO, whose JWT carries the SSO provider ID. That ID can drive Postgres row-level security policies via auth.jwt(), for example to restrict invites to users from the same identity provider.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- Single sign-on concepts
- JWT basics
- Postgres row-level security ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))

## Keywords

SAML, Supabase, X.509, GSuite, Row Level Security, SAML Metadata XML, OpenID Connect

## Related posts

- [Supabase Auth: SSO, Mobile, and Server-side support](https://swe.quest/articles/supabase-auth-sso-mobile-and-server-side-support-6a2bc9b0f4a5ef26.md): Supabase · 2023-04-13 · Medium · 7 min read · Identity & auth, PostgreSQL, Multi-tenancy, Mobile
  Supabase Auth adds SAML 2.0 single sign-on, a PKCE authorization flow for server-side rendering and mobile apps, and native Sign in with Apple on iOS.
- [Build "Sign in with Your App" using Supabase Auth](https://swe.quest/articles/build-sign-in-with-your-app-using-supabase-auth-a42222eedce43362.md): Supabase · 2025-12-04 · Medium · 6 min read · Identity & auth, AI agents, PostgreSQL
  Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with \[Your App\]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO.
- [Custom OIDC Providers for Supabase Auth](https://swe.quest/articles/custom-oidc-providers-for-supabase-auth-f58ec95541f5b5f1.md): Supabase · 2026-04-08 · Medium · 4 min read · Identity & auth
  Supabase Auth now supports connecting any standards-compliant OpenID Connect identity provider, beyond its 20+ built-in social logins, for cases like regional compliance IdPs, self-hosted GitHub Enterprise or GitLab, and niche SSO systems.
- [Enterprise-managed auth for MCP: Claude can now issue the identity assertion](https://swe.quest/articles/enterprise-managed-auth-for-mcp-claude-can-now-issue-the-identity-assertion-aa52985ca7fe5bc7.md): Supabase · 2026-11-03 · Medium · 3 min read · Identity & auth, AI agents
  Claude can now act as the issuer of the signed ID-JAG (Identity Assertion JWT Authorization Grant) for the Supabase MCP server, enabling enterprise-managed authorization for organizations whose identity provider doesn't support the MCP Enterprise-Managed Authorization extension (previously effectively only Okta).
- [Multi-factor Authentication via Row Level Security Enforcement](https://swe.quest/articles/multi-factor-authentication-via-row-level-security-enforcement-05f1f64f444784f0.md): Supabase · 2022-12-14 · Medium · 5 min read · Identity & auth, PostgreSQL
  Supabase Auth now offers TOTP-based multi-factor authentication to all users, built around separate enroll, challenge and verify endpoints.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
