> ## Documentation Index
> Fetch the complete documentation index at: https://www.aptible.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Set Up Single Sign-On (SSO) for Auth0

> This guide provides detailed instructions on how to set up a custom SAML application in Auth0 for integration with Aptible.

## Prerequisites

* An active Auth0 account
* Administrative access to the Auth0 dashboard
* Aptible Account Owner access to enable and configure SAML settings

## Creating Your Auth0 SAML Application

<Steps>
  <Step title="Accessing the Applications Dashboard">
    Log into your Auth0 dashboard. Navigate to **Applications** using the left navigation menu and click **Create Application**. Enter a name for your application (we suggest "Aptible"), select **Regular Web Applications**, and click **Create**.

    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/sso-auth0-create.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=bcc6343645fa1b2ca79bf6f0d28b79e4" alt="" width="1594" height="1320" data-path="images/sso-auth0-create.png" />
  </Step>

  <Step title="Enabling SAML2 WEB APP">
    Select the **Addons** tab and enable the **SAML2 WEB APP** add-on by toggling it on. Navigate to the **Usage** tab and download the Identity Provider Metadata or copy the link to it. Close this window—It will toggle back to off, which is expected. We will activate it later.

    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/sso-auth0-metadata.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=02fde8e7f4ec3f687182592ff9a833bd" alt="" width="1262" height="840" data-path="images/sso-auth0-metadata.png" />
  </Step>

  <Step title="Enable SAML Integration">
    Log into your Aptible dashboard as an Account Owner. Navigate to **Settings** and select **Single Sign-On**. Copy the following information; you will need it later:

    * **Single Sign-On URL** (Assertion Consumer Service \[ACS] URL):\
      `https://auth.aptible.com/organizations/xxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx/saml/consume`

          <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/sso-auth0-acs.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=282eef17d189276eee417e79a27dd3c1" alt="" width="1896" height="1086" data-path="images/sso-auth0-acs.png" />
  </Step>

  <Step title="Upload Identity Provider Metadata">
    On the same screen, locate the option for **Metadata URL**. Copy the content of the metadata file you downloaded from Auth0 into **Metadata File XML Content**, or copy the link to the file into the **Metadata URL** field. Click **Save**. After the information has been successfully saved, copy the newly provided information:

    * **Shortcut SSO login URL**:\
      `https://app.aptible.com/sso/xxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx`

          <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/sso-auth0-shortcut.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=8289a856a132dd07065773172568d613" alt="" width="2308" height="812" data-path="images/sso-auth0-shortcut.png" />
  </Step>

  <Step title="Configuring SAML2 in Auth0">
    Return to the Auth0 SAML Application. In the Application under **Settings**, configure the following:

    * **Application Login URI**:\
      `https://app.aptible.com/sso/xxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx`
      (this is the Aptible value of **Shortcut SSO login URL**).
    * **Allowed Callback URLs**:\
      `https://auth.aptible.com/organizations/xxxxx-xxx-xxxx-xxxx-xxxxxxxxxxxx/saml/consume`
      (this is the Aptible value of **Single Sign-On URL - Assertion Consumer Service \[ACS] URL**).
    * Scroll down to **Advanced Settings -> Grant Types**. Select the grant type appropriate for your Auth0 configuration. Save the changes. Re-enable the **SAML2 WEB APP** add-on by toggling it on. Switch to the **Settings** tab. Copy the following into the **Settings** space (ensure that nothing else remains there):

    ```json theme={null}
    { 
      "nameIdentifierProbes": [ 
        "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" 
      ] 
    }
    ```

    <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/sso-auth0-settings.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=94fa509f5550f092193d2e747ece1459" alt="" width="1948" height="1164" data-path="images/sso-auth0-settings.png" />
  </Step>

  <Step title="Finalize the Setup">
    Click on **Debug** — Ensure the opened page indicates "It works." Close this page, scroll down and select **Enable**.

    * Ensure that the correct users have access to your app (specific to your setup). Save the changes.

          <img src="https://mintcdn.com/aptible/RWSo_H5DBAoWcXSD/images/sso-auth0-itworks.png?fit=max&auto=format&n=RWSo_H5DBAoWcXSD&q=85&s=9170e3b4a44e01fe97112e8ac2e1f0e6" alt="" width="1888" height="1676" data-path="images/sso-auth0-itworks.png" />
  </Step>
</Steps>

### Attribute Mapping

No additional attribute mapping is required for the integration to function.

### Testing the Login

Open a new incognito browser window. Open the link Aptible provided as **Shortcut SSO login URL**. Ensure that you will be able to login.
