# Auth0

> Use Auth0 as your SAML identity provider with the SAML2 Web App add-on.

Source: https://diakrin.com/docs/sso/auth0

Configure Auth0 as the **identity provider** for Diakrin. Use a dedicated application with the SAML2 Web App add-on, rather than an inbound SAML connection that signs users into Auth0.

## Create the application

1. In Auth0 Dashboard, open **Applications → Applications** and create a dedicated application named **Diakrin**.
2. Open **Addons → SAML2 Web App** and enable the add-on.
3. Set **Application Callback URL** to the ACS URL in your [setup packet](/docs/sso#get-your-setup-packet).
4. In the add-on settings, map `email` to the user’s work email and set the audience to Diakrin’s SP Entity ID. Use EmailAddress NameID with the mapped work email, or an agreed stable Persistent identifier.
5. Apply your organization’s connection and access policies so only pilot users can sign in.

## Review the settings

| Auth0 setting | Value |
| --- | --- |
| Application Callback URL / recipient | Diakrin ACS URL |
| `audience` | Diakrin SP Entity ID |
| `mappings` | Work email mapped to `email` |
| `nameIdentifierFormat` | EmailAddress or Persistent |
| Signature / digest | RSA-SHA256 / SHA256 |

Ensure NameID selects the intended mapped identifier. Auth0’s defaults can use a different NameID format or older signing algorithms; review the add-on’s settings explicitly.

## Copy the email-based settings

In the add-on’s **Settings** tab, use this starting configuration. Replace both placeholder URLs with the exact setup-packet values, and set **Application Callback URL** to the same ACS URL.

```json
{
  "audience": "REPLACE_WITH_DIAKRIN_SP_ENTITY_ID",
  "recipient": "REPLACE_WITH_DIAKRIN_ACS_URL",
  "mappings": { "email": "email" },
  "passthroughClaimsWithNoMapping": false,
  "mapIdentities": false,
  "nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
  "nameIdentifierProbes": ["email"],
  "signatureAlgorithm": "rsa-sha256",
  "digestAlgorithm": "sha256"
}
```

The profile’s `email` must contain the employee’s work email. The mapping sends an attribute named `email`; the probe uses that value for NameID. If you use Persistent NameID, agree its stable identifier with Diakrin before changing this example. Review any existing Auth0 Actions that override SAML settings.

## Activate and test

Open the add-on’s **Usage** tab and obtain **Identity Provider Metadata**. Return the metadata URL or XML, approved domains and certificate expiry to your Diakrin onboarding contact. Keep custom-domain metadata and login endpoints consistent. After activation, follow [Test and roll out SSO](/docs/sso/testing).

Official references: [Configure Auth0 as a SAML identity provider](https://auth0.com/docs/authenticate/single-sign-on/outbound-single-sign-on/configure-auth0-saml-identity-provider), [Customize SAML assertions](https://auth0.com/docs/authenticate/protocols/saml/saml-configuration/customize-saml-assertions) and [Attribute mapping examples](https://auth0.com/docs/authenticate/protocols/saml/saml-configuration/saml-attribute-mapping-examples).
