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

# Microsoft Entra ID

> How to configure SAML SSO with Microsoft Entra ID (Azure AD) for your Tuple team

export const provider_1 = "Microsoft Entra ID"

export const children_0 = undefined

export const provider_0 = "Microsoft Entra ID"

This guide walks through configuring SAML SSO with Microsoft Entra ID (formerly Azure AD) as your identity provider.

<Info>
  Email addresses in {provider_0} and Tuple must match exactly. For example, `dev+tuple@company.com` does not match `dev@company.com`. Verify your team's email addresses before enabling SSO.
</Info>

<Steps>
  <Step title="Create an enterprise application">
    Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com) as at least a Cloud Application Administrator.

    Navigate to **Identity > Applications > Enterprise applications** and click **New application**. Then click **Create your own application**.

    Enter "Tuple" as the application name, select **Integrate any other application you don't find in the gallery (Non-gallery)**, and click **Create**.
  </Step>

  <Step title="Assign users">
    Before configuring SSO, assign the users who need access to Tuple. In your new Tuple application, go to **Users and groups** and add the users or groups that should have SSO access.
  </Step>

  <Step title="Configure SAML">
    In your Tuple application, navigate to **Single sign-on** in the left sidebar and select **SAML** as the sign-on method.

    <img src="https://mintcdn.com/tuple-0f82e5be/mvUxndXY5Na4FaZB/images/team-management/sso/entra-id/saml-configuration.png?fit=max&auto=format&n=mvUxndXY5Na4FaZB&q=85&s=3de40d0dd5e3abcb260f334025382e3d" alt="SAML-based Sign-on configuration page in Microsoft Entra ID" width="1726" height="1156" data-path="images/team-management/sso/entra-id/saml-configuration.png" />

    Click **Edit** on the **Basic SAML Configuration** card and fill in the following fields:

    **Identifier (Entity ID)**

    ```
    https://production.tuple.app/users/saml/metadata
    ```

    **Reply URL (Assertion Consumer Service URL)**

    ```
    https://production.tuple.app/users/saml/auth
    ```

    Click **Save**.
  </Step>

  <Step title="Configure attributes and claims">
    Click **Edit** on the **Attributes & Claims** card. Add two custom claims so Tuple receives the user's first and last name.

    Click **Add new claim** and create each of the following:

    | Name         | Source attribute |
    | ------------ | ---------------- |
    | `first_name` | `user.givenname` |
    | `last_name`  | `user.surname`   |

    Leave the **Namespace** field empty for both claims.

    Tuple also reads `email` from the SAML response. The default claim for email address mapped to `user.mail` works automatically -- no changes needed.
  </Step>

  <Step title="Set up SAML in Tuple">
    On the **SAML Certificates** card, download the **Certificate (Base64)** file.

    Then, in the **Set up Tuple** card, copy the following values:

    * **Login URL** -- this is your IdP authentication URL
    * **Microsoft Entra Identifier** -- this is your IdP entity ID

    Navigate to the **Settings** tab of the [team management dashboard](https://production.tuple.app/team_management/settings).

    <Info>
      Only [team owners](/team-management/team-owner-and-managers) can enable SAML. To find out who your team owner is, check [your profile](https://production.tuple.app/profile#team).
    </Info>

    Under **Sign-in methods**, set **Required Authentication Provider** to **SAML SSO**. The **Update SAML Configuration** form appears:

    <img src="https://mintcdn.com/tuple-0f82e5be/DYhTWyURiIllHPbV/images/team-management/sso/update-configuration.png?fit=max&auto=format&n=DYhTWyURiIllHPbV&q=85&s=e70c9481be3de1a3c3fca8b4ab6b71a4" alt="SAML configuration form in Tuple" width="1338" height="1163" data-path="images/team-management/sso/update-configuration.png" />

    Fill in the values with your {provider_1} metadata:

    {children_0}

    Select the **Email Domain** that SAML should apply to. Only domains with confirmed team members are available.

    Click **Save as draft**. Your draft is saved as a **Pending Update** alongside your current sign-in method, so no one on your team is affected yet.

    <img src="https://mintcdn.com/tuple-0f82e5be/DYhTWyURiIllHPbV/images/team-management/sso/pending-update.png?fit=max&auto=format&n=DYhTWyURiIllHPbV&q=85&s=3cd1871de2b84121fb99798a48d7acd0" alt="Pending SAML update showing Test and Publish actions" width="1190" height="835" data-path="images/team-management/sso/pending-update.png" />

    Click **Test** to verify the configuration end-to-end. Tuple signs you in through {provider_1} so you can confirm that authentication succeeds before the change affects anyone else on your team.

    Once the test succeeds, click **Publish** to make the configuration live. Active Tuple sessions persist, but new sign-ins are routed through {provider_1}.

    Use **Edit** to tweak the draft, or **Discard** to throw it away without publishing.
  </Step>
</Steps>
