---
title: "Set up single sign-on with Microsoft Entra ID"
site: admin
version: 2027.1
versions: "all"
url: https://docs-new.servicely.ai/admin/2027.1/access/sign-in/sso-microsoft-entra-id/
type: task
application: sso
last_updated: 2026-12-03
commit: 8d233372fa05
---


Set up single sign-on so users sign in to Servicely with their Microsoft Entra ID account instead of a Servicely password. You create an identity provider in Servicely, an enterprise application in Microsoft Entra ID, and then give each the other's details.

## Before you begin

- You need the `administrator` role in Servicely.
- Switch to the Administration workspace with the **Workspace** selector at the foot of the menu.
- You need a Microsoft Entra ID account that can create enterprise applications.
- Know your instance address, for example `https://<instance>.servicely.ai`.
- Each user who signs in already has a Servicely user record whose **Email** is their Microsoft sign-in name. [Set up SCIM provisioning from Entra ID](page:access/sign-in/set-up-scim-provisioning) creates the records for you.

## Steps

<Steps>
  <Step>
    Go to **Access & security → Authentication → Identity provider**.

    <Image src="asset:screenshots/admin/access-sign-in-sso-microsoft-entra-multitenant/identity-provider-menu.png">The Identity provider item in the Access & security menu.</Image>
  </Step>
  <Step>
    Select **New**, open the **Templates** menu at the top right and select **Microsoft Azure**. The template enters `azure_sso` in **Client identifier** and turns on **Show on login screen**.
  </Step>
  <Step>
    Enter a **Name** and select **Create**. Keep the **Client identifier** to hand, because the Microsoft URLs contain it.

    <Image src="asset:screenshots/admin/access-sign-in-sso-microsoft-entra-id/new-identity-provider.png">A new identity provider filled from the Microsoft Azure template, with Type SAML 2.0 and the client identifier azure_sso.</Image>
  </Step>
  <Step>
    In the Microsoft Entra admin centre, create an enterprise application of your own, not one from the gallery. Microsoft describes the screen in [Quickstart: Add an enterprise application](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/add-application-portal).
  </Step>
  <Step>
    In the Microsoft Entra admin centre, open the application's **Single sign-on** page, select **SAML** and edit **Basic SAML Configuration**. Enter both values and save. See [Enable SAML single sign-on for an enterprise application](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/add-application-portal-setup-sso).

    <!-- code: servicely-core/src/main/kotlin/com/servicely/core/security/context/pac4j/saml/SAML2CommonUtils.kt:110 -->
    | Field | What to enter | Example |
    | --- | --- | --- |
    | **Identifier (Entity ID)** | Your instance address, then `/idp_callback?client_name=` and the client identifier. | `https://<instance>.servicely.ai/idp_callback?client_name=azure_sso` |
    | **Reply URL (Assertion Consumer Service URL)** | The same value. | `https://<instance>.servicely.ai/idp_callback?client_name=azure_sso` |
  </Step>
  <Step>
    In the Microsoft Entra admin centre, open **Users and groups** and assign the people who sign in to Servicely. See [Manage users and groups assignment to an application](https://learn.microsoft.com/en-us/entra/identity/enterprise-apps/assign-user-or-group-access-portal).
  </Step>
  <Step>
    In the Microsoft Entra admin centre, return to **Single sign-on** and download **Federation Metadata XML** from the SAML certificates section.
  </Step>
  <Step>
    In Servicely, open the identity provider and paste the whole file into **IDP Metadata XML** on the **Provider configuration** tab. Copy it from a plain text or code editor, because a word processor adds characters that break the XML.

    <Image src="asset:screenshots/admin/access-sign-in-sso-microsoft-entra-id/provider-configuration.png">The Provider configuration tab with IDP user attribute, SP user field, Maximum authentication lifetime and an empty IDP Metadata XML field.</Image>
  </Step>
  <Step>
    Set **Active** to Yes and select **Save**. Servicely tidies the XML and fills in **Login URL** from it.
  </Step>
  <Step>
    Open your instance in a private browser window, select the Microsoft Azure button on the sign-in page and sign in as a user you assigned.
  </Step>
</Steps>

## Result

The sign-in page shows a button for the identity provider. A user who selects it signs in at Microsoft and returns to Servicely signed in. Servicely finds the user record whose **Email** matches the name Microsoft sends, and refuses a Microsoft account that has no user record.

## Options

All of these are fields on the identity provider.

| To | Do this |
| --- | --- |
| Send people who are not signed in straight to Microsoft | Set **Default** to Yes. |
| Change the text of the sign-in button | Change **Login screen tip** on the **Other settings** tab. |
| Remove the button from the sign-in page | Set **Show on login screen** to No on the **Other settings** tab. |
| Match users on another field | Enter the SAML attribute in **IDP user attribute** and the user field in **SP user field**. The field holds a different value for every user. |
| Change how old a Microsoft sign-in can be | Change **Maximum authentication lifetime**, in seconds. The template enters 7776000, which is 90 days. |
| Ask for the email address before the sign-in method | Turn on **Email first**. See [Security and upload settings](page:access/sign-in/security-and-upload-settings). |

## Related

- [Set up single sign-on across Microsoft Entra tenants](page:access/sign-in/sso-microsoft-entra-multitenant)
- [Set up SCIM provisioning from Entra ID](page:access/sign-in/set-up-scim-provisioning)
- [Security and upload settings](page:access/sign-in/security-and-upload-settings)
- [Enforce two-factor authentication](page:access/sign-in/two-factor-authentication)
