Configuring Authentik as a SAML 2.0 Identity Provider: understanding the IdP and SP roles, setting the ACS URL, Entity ID, NameID policy, and signing certificates, exporting the IdP metadata, mapping attributes via property mappings, and knowing when to choose SAML over OIDC.

The proxy provider phase is complete: in episodes 12 and 13, you protected applications via forward auth. Starting with this episode, we enter a new phase of a different nature: SAML. If forward auth protects applications that have no login system of their own, SAML connects Authentik with enterprise applications that have their own login system and demand a federation standard.
OIDC (covered in phase 3) is the modern JSON-based authentication standard. SAML 2.0 is its XML-based predecessor — older, more verbose, but still a mandatory standard in many enterprise products: Google Workspace, AWS, Salesforce, and Office 365. In this episode, you turn Authentik into a SAML Identity Provider (IdP).
In SAML, there are always two parties:
The exchange is simple: the user opens the application (SP), the SP throws the question "who is this user?" to the IdP, the user logs in at Authentik, Authentik issues an assertion — a signed XML document containing the user's identity — then the SP validates the signature and accepts the user.
Analogy: the SP is the receptionist asking visitors for a stamped ID card. The IdP is the civil registry office that issues it. The receptionist doesn't know the visitor personally — it only trusts the civil registry's signature.
In the Authentik UI, navigate to Applications → Applications → New Application, choose the SAML Provider type, then fill in the following settings:
| Field | Meaning |
|---|---|
| Name | Provider name, for example "GitLab SAML" |
| Authorization flow | The flow run when the user logs in (usually default-authentication-flow) |
| ACS URL | The SP address that receives the assertion (Assertion Consumer Service) |
| Audience | The SP's Entity ID — the application's unique identifier in the SAML world |
| Issuer | Defaults to the IdP metadata URL; can be overridden in Advanced settings |
| Service Provider Binding | How the assertion is delivered: HTTP POST or HTTP Redirect |
| NameID Policy | The identity format for the user in the assertion |
| Signing certificate | The certificate that signs the assertion and responses |
The ACS URL and Audience come from the integrated application — they aren't values you decide yourself. This is the part most often mixed up: you don't guess values, you read them from the SP documentation or metadata.
Binding determines how the assertion is transported over HTTP:
Most modern applications support POST; it's also what Authentik recommends. Choose POST unless the SP demands Redirect.
SAML relies on cryptographic trust. The assertion must be signed so the SP is sure it genuinely came from Authentik and wasn't modified in transit.
The steps in Authentik: create a key pair in Certificates (or use an existing one), then select it as the provider's Signing certificate. Two related algorithms:
RSA-SHA256.SHA-256.Warning
If the SP fails signature validation, first check the key on the SP side. The signature is validated with the public key — not the private key — which must match the certificate you selected in Authentik. Changing the certificate means every SP pointing at Authentik must have its metadata updated.
NameID is the user's unique identifier in the assertion — a kind of stable master number that doesn't change even when other attributes change. Supported formats:
persistent — a stable hash identity of the user. The best default choice.transient — a session-based identity, changes on every login.emailAddress — uses the user's email as the NameID. Risky if users are free to change their email.windowsDomainQualifiedName — a UPN-based identity, relevant in Active Directory environments.Authentik lets you choose a property mapping that produces the NameID via the NameID property mapping field. If left empty, the NameID policy from the SP's request applies.
SAML doesn't demand manually copying values if both parties provide metadata — an XML document containing endpoints, bindings, certificates, and unique identifiers.
Authentik's IdP metadata is available at:
https://authentik.example.com/application/saml/<application-slug>/metadata/Replace <application-slug> with the slug of the SAML application you created. A snippet of the metadata looks like this:
<EntityDescriptor entityID="https://authentik.example.com/application/saml/gitlab/metadata/">
<SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" ...>
<KeyDescriptor use="signing">
<KeyInfo><X509Data><X509Certificate>...</X509Certificate></X509Data></KeyInfo>
</KeyDescriptor>
...
</SPSSODescriptor>
</EntityDescriptor>In the UI, metadata can be downloaded via the Download button on the provider page, or accessed through the Metadata tab. Conversely, if the SP provides XML metadata, Authentik can create a provider automatically from that metadata — choose the SAML Provider from Metadata type when creating a provider.
The assertion can carry additional attributes beyond NameID — email, name, groups — via property mappings. Authentik provides built-in mappings for email, username, name, groups, and UID. If the SP demands a special format, create a custom mapping. Example of an SP that wants givenname and surname separated:
return request.user.name.split(" ", 1)[0]return request.user.name.rsplit(" ", 1)[-1]Set the SAML Attribute Name to what the SP expects (for example http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname), then select that mapping on the provider.
| Consideration | SAML | OIDC |
|---|---|---|
| Format | XML, verbose | JSON, concise |
| Enterprise applications | Google Workspace, AWS, Salesforce, Office 365 | Modern applications |
| Ease of integration | Needs metadata and certificates | Simple discovery URL |
| Token | XML assertion | JWT |
Rule of thumb: for new applications and modern integrations, choose OIDC. For enterprise applications that only support SAML, use SAML. Don't choose SAML just because it's "more secure" — both are secure when configured correctly.
This episode configured Authentik as a SAML IdP: understanding the IdP and SP roles, filling in the ACS URL, Audience, and POST binding, preparing the signing certificate along with the signing and digest algorithms, choosing a stable NameID policy, exporting the IdP metadata via URL, mapping attributes with property mappings, and deciding when SAML rather than OIDC.
In episode 15, you'll use this foundation to connect real SPs — GitLab, Nextcloud, Google Workspace, and AWS — through metadata exchange, then walk through the SAML troubleshooting that most often makes people give up. See you there!