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

# Microsoft Entra ID SSO setup

> Configure SAML-based single sign-on between Microsoft Entra ID and CodeRabbit from your organization's account management page.

export const EnterprisePlanBadge = ({tip = "This feature is available exclusively as part of the Enterprise plan. Please refer to our pricing page for more information about our plans and features.", title = "Enterprise Plan", cta = "Read more", href = "https://coderabbit.ai/pricing", disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="building-2" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

export const AdminRoleBadge = ({tip = "This feature requires an organization owner, an admin role or the corresponding permission. Regular Members do not have access.", title = "Admin Only", cta = "View roles", href = "/management/roles", disabled = false}) => {
  return <Tooltip tip={tip} cta={cta} href={href}>
        <Badge icon="lock" color="orange" disabled={disabled || undefined}>
            {title}
        </Badge>
    </Tooltip>;
};

<EnterprisePlanBadge />

<AdminRoleBadge tip="This page requires organization admin access. Members do not have access to Enterprise SSO settings." />

Use this guide to configure Microsoft Entra ID as the identity provider for your CodeRabbit Enterprise organization. The account management SSO wizard guides you through domain verification, Microsoft Entra SAML setup, testing, and activation.

After SSO is activated, users with a verified email domain must sign in to CodeRabbit through Microsoft Entra ID.

SAML assignment controls access to the Microsoft Entra application; it does not replace CodeRabbit SCIM provisioning or identity linking. For organizations using SCIM or GitHub Enterprise Managed Users, complete the separate [SCIM directory sync](/management/sso/scim) onboarding steps. Group membership controls application access, not PR-review licensing.

## Before you start

Make sure you have:

* **Critical: You must have an invitation to your CodeRabbit organization from your CodeRabbit account team before starting this setup.**
* Organization admin access in the CodeRabbit account management page
* Access to the **Microsoft Entra admin center**
* Permission to create and configure Enterprise applications in Microsoft Entra ID
* Access to your DNS provider if your email domain still needs verification
* The users or groups that should be allowed to sign in through Microsoft Entra ID

<Info>
  If you do not see the **Security** section or the **Start configuration** button in your organization profile, contact your CodeRabbit account team. Your organization must be prepared for self-serve SSO before the account management SSO wizard appears.
</Info>

## Set up Microsoft Entra ID self-serve SSO

<Steps>
  <Step title="Open the account management SSO wizard">
    Accept your CodeRabbit organization invitation and sign in to the account management page. Open the organization switcher, find the invited organization, and click **Manage**.

    In the organization profile, select **Security**, and click **Start configuration**.
  </Step>

  <Step title="Add and verify your email domain">
    In **Domains**, enter the email domain that should use Microsoft Entra ID for CodeRabbit sign-in, then click **Add**.

    If the wizard asks you to add a DNS record, add the generated `TXT` record in your DNS provider and wait for the domain to show **Verified** before continuing.
  </Step>

  <Step title="Select Microsoft Entra ID">
    In **Connection**, select **Microsoft Entra** as the SAML identity provider.

    <Frame caption="Select Microsoft Entra as the identity provider">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-select-provider.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=16718d0a9d0ba0e25b57d10cec8c439f" alt="Identity provider selection screen with the Microsoft Entra tile highlighted" width="1762" height="1418" data-path="assets/images/entra-self-serve-select-provider.png" />
    </Frame>
  </Step>

  <Step title="Create the Enterprise application in Microsoft Entra ID">
    In the Microsoft Entra admin center, go to **Enterprise applications** -> **All applications**, then click **New application**.

    Select **Create your own application**, enter a clear app name such as `CodeRabbit`, select **Integrate any other application you don't find in the gallery (Non-gallery)**, and create the application.
  </Step>

  <Step title="Configure SAML single sign-on">
    In the new Enterprise application, open **Single sign-on** from the **Manage** menu, then select **SAML**.

    <Frame caption="Open SAML-based Sign-on for the Microsoft Entra application">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-saml-overview.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=752d9292f55b7428d73bed867ba41e83" alt="Microsoft Entra SAML-based Sign-on page showing the Basic SAML Configuration, Attributes and Claims, and SAML Certificates sections" width="4164" height="1980" data-path="assets/images/entra-self-serve-saml-overview.png" />
    </Frame>

    In **Basic SAML Configuration**, click **Edit** and copy the values from the account management SSO wizard into Microsoft Entra ID:

    | Microsoft Entra field                      | Value                                                               |
    | ------------------------------------------ | ------------------------------------------------------------------- |
    | Identifier (Entity ID)                     | Copy from the account management SSO wizard                         |
    | Reply URL (Assertion Consumer Service URL) | Copy from the account management SSO wizard                         |
    | Sign on URL                                | Leave blank unless your CodeRabbit account team instructs otherwise |
    | Relay State                                | Leave blank                                                         |
    | Logout URL                                 | Leave blank                                                         |

    <Frame caption="Copy the service provider values from the account management SSO wizard">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-sp-values.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=c83fd770651125fbe0a2864ab99307b7" alt="Account management SSO wizard showing the Identifier Entity ID and Reply URL fields highlighted" width="1818" height="1430" data-path="assets/images/entra-self-serve-sp-values.png" />
    </Frame>

    <Frame caption="Paste the Identifier value into Microsoft Entra">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-basic-saml-entity-id.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=446736464d33bee9cacf8d21669663c7" alt="Microsoft Entra Basic SAML Configuration panel with the Identifier Entity ID field populated" width="4196" height="2048" data-path="assets/images/entra-self-serve-basic-saml-entity-id.png" />
    </Frame>

    <Frame caption="Paste the Reply URL value into Microsoft Entra">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-basic-saml-reply-url.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=b3d51e8623875234ec0e2b99b75ee132" alt="Microsoft Entra Basic SAML Configuration panel with the Reply URL field populated" width="4188" height="1984" data-path="assets/images/entra-self-serve-basic-saml-reply-url.png" />
    </Frame>

    Click **Save**, then close the **Basic SAML Configuration** panel.
  </Step>

  <Step title="Confirm attributes and claims">
    On the **SAML-based Sign-on** page, find **Attributes & Claims** and click **Edit**.

    Confirm the SAML response includes these claims:

    | Attribute     | Claim name                                                           | Value            |
    | ------------- | -------------------------------------------------------------------- | ---------------- |
    | Email address | `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress` | `user.mail`      |
    | First name    | `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname`    | `user.givenname` |
    | Last name     | `http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname`      | `user.surname`   |

    The email address claim is required. First name and last name are optional in the account management SSO wizard, but adding them helps CodeRabbit populate user profile details correctly.

    <Frame caption="Review the required Microsoft Entra attributes">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-attributes.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=ee7a8dbdadc5118872c7c812ffdfc577" alt="Account management SSO wizard showing the email address, first name, and last name claims required from Microsoft Entra" width="1774" height="1412" data-path="assets/images/entra-self-serve-attributes.png" />
    </Frame>
  </Step>

  <Step title="Assign users or groups in Microsoft Entra ID">
    Open the Enterprise application's **Users and groups** page and assign the users or groups that should be allowed to sign in to CodeRabbit through Microsoft Entra ID.

    Users cannot complete SSO sign-in until they are assigned to the Enterprise application.

    <Frame caption="Assign users or groups to the Microsoft Entra application">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-assign-users.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=27c1345606a631abc0f29d7c07068c0a" alt="Microsoft Entra Add Assignment screen showing a selected user ready to be assigned to the Enterprise application" width="4180" height="1990" data-path="assets/images/entra-self-serve-assign-users.png" />
    </Frame>
  </Step>

  <Step title="Paste the Microsoft Entra metadata URL">
    On the **SAML-based Sign-on** page, find **SAML Certificates** and copy the **App Federation Metadata Url**.

    <Frame caption="Copy the App Federation Metadata Url from Microsoft Entra">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-metadata-url.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=f980bd0735e121245e1f8d9647272fa2" alt="Microsoft Entra SAML Certificates section with the App Federation Metadata Url copy button highlighted" width="1330" height="720" data-path="assets/images/entra-self-serve-metadata-url.png" />
    </Frame>

    Return to the account management SSO wizard. In **Configure Microsoft Entra**, keep **Add via metadata** selected, paste the App Federation Metadata URL, and continue.

    <Frame caption="Paste the Microsoft Entra metadata URL into the account management SSO wizard">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-add-metadata.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=c1f2f7a62d450bf2e46fd4e7cee5da93" alt="Account management SSO wizard showing the Metadata URL field populated for Microsoft Entra" width="1788" height="1436" data-path="assets/images/entra-self-serve-add-metadata.png" />
    </Frame>
  </Step>

  <Step title="Test the SSO connection">
    In **Test**, click **Open test URL** and complete the Microsoft Entra ID sign-in flow with an assigned user whose email matches your verified domain.

    Return to the account management SSO wizard and confirm that the latest test result shows **Success**.

    <Frame caption="Open the test URL to verify the Microsoft Entra SSO connection">
      <img src="https://mintcdn.com/coderabbit/xBz26hkvbSyJFy8K/assets/images/entra-self-serve-test.png?fit=max&auto=format&n=xBz26hkvbSyJFy8K&q=85&s=9aaf65ce65539c62fd2dfd933123bdaa" alt="Account management SSO wizard showing the Test your SSO connection step with the Open test URL button" width="1790" height="1428" data-path="assets/images/entra-self-serve-test.png" />
    </Frame>
  </Step>

  <Step title="Activate SSO">
    In **Activate**, review the activation message and click **Activate SSO**.

    <Warning>
      Activation changes sign-in behavior for the verified domain. After activation, users with that email domain must sign in to CodeRabbit through Microsoft Entra ID.
    </Warning>
  </Step>
</Steps>

## Troubleshooting

* If Microsoft Entra reports a missing Identifier or Reply URL, re-copy the values from the account management SSO wizard.
* If the test login says the user is not assigned to the application, assign the user or their group in **Users and groups**.
* If CodeRabbit cannot map the signed-in user, confirm the email address claim is present and uses `user.mail`.
* If metadata import fails, copy the **App Federation Metadata Url** again from **SAML Certificates** and ensure it starts with `https://login.microsoftonline.com/`.

## What's next

<CardGroup cols={1}>
  <Card title="Enterprise SSO overview" href="/management/sso" icon="key" horizontal>
    Return to the SSO overview to understand how Enterprise SSO fits into your CodeRabbit rollout.
  </Card>

  <Card title="Roles and permissions" href="/management/roles" icon="shield-check" horizontal>
    Pair SSO with the right access controls by reviewing how roles work in your CodeRabbit organization.
  </Card>

  <Card title="Support" href="/support" icon="message-circle" horizontal>
    Contact CodeRabbit if the Security section is missing or the SSO test does not succeed.
  </Card>
</CardGroup>
