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

# SAML with Microsoft Entra ID

> Configure SAML 2.0 single sign-on between TrueFoundry and Microsoft Entra ID (formerly Azure AD).

This guide walks you through setting up SAML 2.0 single sign-on between TrueFoundry and Microsoft Entra ID (formerly Azure Active Directory). Once finished, members of your Entra tenant can sign in to TrueFoundry through a **Login with Azure AD** button.

## Prerequisites

* A TrueFoundry tenant with **Admin** access to **Settings → Security & Access → SSO**.
* A Microsoft Entra ID tenant with permission to create **Enterprise Applications** (Cloud Application Administrator or higher).

<Tip>
  You'll bounce between the **Entra admin center** and the **TrueFoundry SSO settings**. Keep both open in adjacent tabs to copy-paste values quickly.
</Tip>

## Configuration overview

<Steps>
  <Step title="Create the SSO configuration in TrueFoundry">
    Save a SAML SSO configuration in TrueFoundry to surface the **Reply URL**, **Identifier (Entity ID)**, and **Relay URL**.
  </Step>

  <Step title="Create an Enterprise Application in Entra">
    Register a non-gallery Enterprise Application that Truefoundry will federate with.
  </Step>

  <Step title="Configure the SAML connection on both sides">
    Paste TrueFoundry's values into Entra, then paste Entra's IdP values back into TrueFoundry.
  </Step>

  <Step title="Assign users and test">
    Assign users or groups to the Entra application and sign in to verify.
  </Step>
</Steps>

## Step 1 — Create the SSO configuration in TrueFoundry

<Steps>
  <Step title="Open SSO settings">
    Go to **Settings → Security & Access → SSO**.

    Click the **+** icon labeled **Add New SSO Config**.

    <Frame caption="SSO page in TrueFoundry — click the + icon to add a new SSO configuration">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-truefoundry-add-sso-config.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=f768205b84d9f33ce04a8b8576ab0070" alt="TrueFoundry SSO settings page with the Add New SSO Config plus button highlighted" width="1024" height="263" data-path="images/sso/entra/saml-truefoundry-add-sso-config.png" />
    </Frame>
  </Step>

  <Step title="Fill in the basic fields">
    * **Enabled**: turn this on.
    * **Name**: a lowercase alphanumeric label — for example, `entraidsaml`.
    * **SSO Provider**: choose **Azure AD**.
    * **Authentication Configuration**: select **SAML v2**.

    Leave **Identity Provider Endpoint** and **X.509 Certificate** blank for now — you'll fill them in once Entra surfaces those values.
  </Step>

  <Step title="Save to reveal the Reply URL, Identifier (Entity ID), and Relay URL">
    Click **Save**. TrueFoundry displays the values you need for Entra on the SSO configuration card:

    * **Identifier (Entity ID)** in Entra — **Audience URI (SP Entity ID)** in TrueFoundry.
    * **Reply URL (Assertion Consumer Service URL)** in Entra — **Single Sign On URL** in TrueFoundry.
    * **Relay State** in Entra — **Relay URL** in TrueFoundry.

    <Frame caption="TrueFoundry SSO configuration card showing the SAML values to copy into Entra">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-truefoundry-sp-metadata.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=e061fae840c0fa4e8af3c4efe9961a2b" alt="TrueFoundry SSO configuration card displaying Audience URI, Single Sign On URL, Metadata URL, and Relay URL for Azure AD SAML setup" width="1024" height="391" data-path="images/sso/entra/saml-truefoundry-sp-metadata.png" />
    </Frame>
  </Step>
</Steps>

## Step 2 — Create an Enterprise Application in Entra

<Steps>
  <Step title="Open the Microsoft Entra admin center">
    Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com/) as an administrator.

    In the left navigation, expand **Identity → Applications** and select **Enterprise applications**.

    <Frame caption="Enterprise applications page in the Microsoft Entra admin center">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-1-a.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=1bc7150bf033304170ef2545ba3705f8" alt="Microsoft Entra admin center showing the Enterprise applications page with the New application button highlighted" width="1500" height="938" data-path="images/sso/entra/saml-step-1-a.png" />
    </Frame>
  </Step>

  <Step title="Create a new application">
    Click **New application** at the top of the **Enterprise applications** page, then select **Create your own application**.

    1. Give the application a name — for example, `TrueFoundry`.
    2. Choose **Integrate any other application you don't find in the gallery (Non-gallery)**.
    3. Click **Create**. It may take a few seconds for Entra to finish provisioning the application.

    <Frame caption="Create your own application panel in Entra">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-1-b.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=e483c6ad231ebfedab49a40aab174070" alt="Create your own application panel with a name field and the non-gallery option selected" width="1500" height="938" data-path="images/sso/entra/saml-step-1-b.png" />
    </Frame>
  </Step>

  <Step title="Open single sign-on">
    From your application's **Overview** page, click **Set single sign on**, then select the **SAML** tile.

    <Frame caption="Select a single sign-on method — choose SAML">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-2-a.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=00fcade7fbc769a1f645e139ae1f77dc" alt="Select a single sign-on method screen in Entra with the SAML tile highlighted" width="1500" height="938" data-path="images/sso/entra/saml-step-2-a.png" />
    </Frame>
  </Step>
</Steps>

## Step 3 — Enter TrueFoundry's details into Entra

On the **Set up Single Sign-On with SAML** page for the application you created in Step 2, edit the **Basic SAML Configuration** card using the **Reply URL**, **Identifier (Entity ID)**, and **Relay State** from Step 1.

<Steps>
  <Step title="Edit Basic SAML Configuration">
    Click the pencil icon on **Basic SAML Configuration** and enter the values from TrueFoundry:

    | Entra field                                    | Value from TrueFoundry          |
    | ---------------------------------------------- | ------------------------------- |
    | **Identifier (Entity ID)**                     | **Audience URI (SP Entity ID)** |
    | **Reply URL (Assertion Consumer Service URL)** | **Single Sign On URL**          |
    | **Relay State**                                | **Relay URL**                   |

    Click **Save** at the top of the panel and close it.

    <Frame caption="Set up Single Sign-On with SAML page in Entra — click the pencil on Basic SAML Configuration">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-2-b.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=8602e2f942390c97273285a40de88d18" alt="Entra Set up Single Sign-On with SAML page with the Basic SAML Configuration edit button highlighted" width="1500" height="938" data-path="images/sso/entra/saml-step-2-b.png" />
    </Frame>

    <Frame caption="Basic SAML Configuration edit panel — paste the Reply URL, Identifier (Entity ID), and Relay State">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-2-c.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=e0cb820fe3fe907519fa487664104e10" alt="Entra Basic SAML Configuration panel showing the Identifier, Reply URL, and Relay State fields" width="1500" height="938" data-path="images/sso/entra/saml-step-2-c.png" />
    </Frame>
  </Step>

  <Step title="Add email and sub claims">
    From the **Attributes & Claims** card, click **Add new claim** and create two additional claims. Leave all other settings at their defaults — including the required **Unique User Identifier (Name ID)** claim and Entra's built-in schema claims.

    ### Add the `email` claim

    1. Click **Add new claim**.
    2. Set **Name** to `email`.
    3. Leave **Namespace** blank and **Name format** as **Omitted (default)**.
    4. Under **Source**, select **Attribute** and set **Source attribute** to `user.userprincipalname`.
    5. Click **Save**.

    <Frame caption="Manage claim — configure the email claim">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-claim-email.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=359cebaf8c62aca850da9a51006d5d21" alt="Entra Manage claim panel with Name set to email and Source attribute set to user.userprincipalname" width="1024" height="324" data-path="images/sso/entra/saml-claim-email.png" />
    </Frame>

    ### Add the `sub` claim

    1. Click **Add new claim** again.
    2. Set **Name** to `sub`.
    3. Leave **Namespace** blank and **Name format** as **Omitted (default)**.
    4. Under **Source**, select **Attribute** and set **Source attribute** to `user.objectid`.
    5. Click **Save**.

    <Frame caption="Manage claim — configure the sub claim">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-claim-sub.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=6105775ec9d9089f526dffdd12e5bbf7" alt="Entra Manage claim panel with Name set to sub and Source attribute set to user.objectid" width="1024" height="318" data-path="images/sso/entra/saml-claim-sub.png" />
    </Frame>

    When finished, your **Attributes & Claims** page should include `email` and `sub` alongside Entra's default claims:

    | Claim name                           | Source attribute         |
    | ------------------------------------ | ------------------------ |
    | **Unique User Identifier (Name ID)** | `user.userprincipalname` |
    | `email`                              | `user.userprincipalname` |
    | `sub`                                | `user.objectid`          |

    <Frame caption="Attributes & Claims — final claim list with email and sub added">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-claims-final.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=b014ba0335082c08b0265b657bbd855e" alt="Entra Attributes and Claims page showing email and sub claims alongside the default SAML claims" width="884" height="586" data-path="images/sso/entra/saml-claims-final.png" />
    </Frame>
  </Step>
</Steps>

## Step 4 — Copy Entra's details back to TrueFoundry

Scroll down on Entra's **Set up Single Sign-On with SAML** page to the **SAML Certificates** and **Set up `<Your App>`** cards.

<Steps>
  <Step title="Download the signing certificate">
    Under **SAML Certificates**, click **Download** next to **Certificate (Base64)**.

    Open the downloaded `.cer` file in a text editor and copy the entire contents — including the `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` lines.

    <Frame caption="SAML Certificates — download Certificate (Base64)">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-certificates.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=7d4f33625cffcacb1ddab5d79b0e296e" alt="Entra SAML Certificates section with the Certificate Base64 download link" width="792" height="385" data-path="images/sso/entra/saml-certificates.png" />
    </Frame>
  </Step>

  <Step title="Copy the Login URL">
    From the **Set up `<Your App>`** card, copy the **Login URL**.

    <Frame caption="Set up your application — copy the Login URL">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-setup-login-url.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=fb233ab706dad5c8ddd8299e85a1118c" alt="Entra Set up application card showing the Login URL field with copy button" width="827" height="208" data-path="images/sso/entra/saml-setup-login-url.png" />
    </Frame>
  </Step>

  <Step title="Paste into TrueFoundry">
    Return to **Settings → Security & Access → SSO** in TrueFoundry and edit the SSO configuration you created in Step 1. Set:

    * **Identity Provider Endpoint** → the **Login URL** from Entra.
    * **X.509 Certificate** → the certificate text you copied from the `.cer` file.

    Click **Save**.
  </Step>
</Steps>

## Step 5 — Assign users in Entra

Entra only lets users sign in to applications they've been explicitly assigned to.

<Steps>
  <Step title="Open Users and groups">
    Inside your Entra application, click **Users and groups** in the left sidebar, then **Add user/group**.

    <Frame caption="Users and groups page in the Entra application">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-4-a.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=99f4e0d91166a117a1f0a2792294a375" alt="Entra application Users and groups page with the Add user/group button highlighted" width="1500" height="938" data-path="images/sso/entra/saml-step-4-a.png" />
    </Frame>
  </Step>

  <Step title="Select who can sign in">
    Pick the individual users or security groups that should have access to TrueFoundry and click **Assign**.

    <Frame caption="Add Assignment — click Users to open the picker">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-4-b.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=465ec480c603b5e711f652da80b7ab51" alt="Entra Add Assignment page with the Users selector showing None Selected" width="1500" height="938" data-path="images/sso/entra/saml-step-4-b.png" />
    </Frame>

    <Frame caption="With users selected, click Assign to grant access">
      <img src="https://mintcdn.com/truefoundry/OlEFjoHwZJ0edSjd/images/sso/entra/saml-step-4-c.png?fit=max&auto=format&n=OlEFjoHwZJ0edSjd&q=85&s=4a84cb9cc97cdc6ab66226c2d12c959b" alt="Entra Add Assignment page with 1 user selected and the Assign button highlighted" width="1500" height="938" data-path="images/sso/entra/saml-step-4-c.png" />
    </Frame>
  </Step>
</Steps>

<Warning>
  Users who are not assigned to the Entra application will see a "no access" error when they click **Login Azure AD** in TrueFoundry.
</Warning>

## Step 6 — Test single sign-on

1. Open a private/incognito window and go to your TrueFoundry login page.
2. Click **Login with Azure AD** (or whichever button label you chose under **Show advanced fields → Button Text**).
3. Authenticate with an Entra user that you assigned to the application.

If the sign-in succeeds you'll land in the TrueFoundry dashboard. The user is created automatically if [JIT provisioning](/docs/platform/user-management#user-provisioning) is on, otherwise they must already exist in TrueFoundry or be invited.

## Optional next steps

* **Automate user lifecycle with SCIM** — see [SCIM with Microsoft Entra ID](/docs/platform/sso/entra/scim) to push users and groups from Entra into TrueFoundry automatically.
* **Use OIDC instead of SAML** — see [OIDC with Microsoft Entra ID](/docs/platform/sso/entra/oidc) for the equivalent OpenID Connect flow.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The Login button works but the user gets 'no matching user found'">
    Check the provisioning mode under **Settings → Security & Access → Provisioning**:

    * **Invite-only** — the user must be invited from **Access → Users** first.
    * **JIT** — the user is created on first login automatically.
    * **SCIM** — the user must be synced from your IdP first. See [SCIM with Microsoft Entra ID](/docs/platform/sso/entra/scim).
  </Accordion>

  <Accordion title="'AADSTS50105: The signed in user is not assigned to a role for the application'">
    The Entra user isn't assigned to your application. Go back to **Step 5** and assign them under **Users and groups**.
  </Accordion>

  <Accordion title="'Invalid Signature' or 'Could not validate SAML response'">
    The certificate copied into TrueFoundry doesn't match Entra's active signing certificate. Re-download **Certificate (Base64)** from Entra and paste the full PEM (including the BEGIN/END lines) into TrueFoundry.
  </Accordion>

  <Accordion title="Users sign in but email or unique ID is empty">
    Confirm you added the `email` and `sub` claims under **Attributes & Claims** as described in **Step 3**. If those claims are missing or mapped incorrectly, TrueFoundry cannot read the user's email or unique ID from the SAML response.
  </Accordion>
</AccordionGroup>
