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

# Entra ID SAML Setup

> Learn how to configure Opal to authenticate users via Microsoft Entra ID SAML SSO.

Use this guide to configure Opal to allow or require users to log in with Microsoft Entra ID SAML SSO.

## Prerequisites

* **Opal**: an account with admin access to your organization's settings, so you can open the **SAML SSO Settings** setup modal.
* **Microsoft Entra ID**: an account with permission to create enterprise applications and assign users, such as Cloud Application Administrator or Application Administrator.
* **Matching user emails.** Each user's email in Entra ID must match the email of their Opal account in order for the user's SAML login to succeed.

## Setup

1. Log in to the [Microsoft Entra admin center](https://entra.microsoft.com) as an administrator, then from the left sidebar, select **Entra ID** > **Enterprise apps** > **New application** > **Create your own application**.

2. Enter **Opal** as the name of your app, select **Integrate any other application you don't find in the gallery (Non-gallery)**, then click **Create**.

3. In a new tab, log in to the Opal dashboard, then go to **Configuration > Settings > Authentication > SAML SSO Settings > Setup**. Keep this modal open. You need its **ACS URL** and **Entity ID** values in the next step.

4. Back in Entra ID, on the Opal app page, select **Single sign-on** from the **Manage** section of the left menu, then select **SAML**.

5. In the **Basic SAML Configuration** section, click **Edit**, fill in the following fields, then click **Save**. Leave all other fields in their default state.
   * **Identifier (Entity ID):** Use **Entity ID** from the Opal modal.
   * **Reply URL (Assertion Consumer Service URL):** Use the **ACS URL** from the Opal modal.

6. In the **Attributes & Claims** section, click **Edit**. By default, Entra ID sends claims named `givenname`, `surname`, and `emailaddress`. Opal expects `given_name`, `family_name`, and `email`, so add the following claims. For each one, click **Add new claim**, enter the **Name** and **Source attribute**, then click **Save**:

   * `given_name` > `user.givenname`
   * `family_name` > `user.surname`
   * `email` > `user.mail`

7. In the **SAML Certificates** section, find **Certificate (Base64)** and click **Download**.

8. In the **Set up Opal** section, copy the **Login URL**.

9) Back in Opal, enter the following information, then click **Save**:
   * **Identity Provider SAML 2.0 SSO URL:** Use the **Login URL** from Entra ID.
   * **Identity Provider Public Certificate**: Upload the **Certificate (Base64)** you downloaded from Entra ID.

10) Back in Entra ID, select **Users and groups** from the **Manage** section of the left menu, then click **Add user/group** and assign any users or groups who you want to grant access to Opal via Entra ID SAML SSO.

Your SAML SSO setup should now be complete. For more options on configuring your SAML connection, see [the SSO SAML guide](https://docs.opal.dev/docs/sso-with-saml.md).

## Test SAML login

1. Go to Opal, then log out of your Opal account.
2. Click on **Continue with SAML** on the Opal login screen.
3. Manually type your email address in the **Email field**. This email must have the same domain name as the user who created the SAML connection in the Opal UI.
4. Click **Continue with SAML**. This should prompt you to log in with Microsoft Entra ID.
5. After you authenticate, you should be able to log into Opal.

## Common issues

If a user can't sign in, confirm that the user is assigned to the Opal app under **Users and groups** in Entra ID, and that their email in Entra ID matches the email of their Opal account.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.