---
title: "Set up single sign-on with Microsoft Entra ID"
site: admin
version: 1.11
versions: "all"
url: https://docs-new.servicely.ai/admin/1.11/access/sso-microsoft-entra-id/
type: task
application: sso
last_updated: 2026-10-18
commit: c05803eee2ce
---


Set up single sign-on so users sign in to Servicely with their Microsoft Entra ID account instead of a Servicely password. This task is for administrators, and it needs an administrator on the Entra side as well.

## Before you begin

- You need `administrator` in Servicely.
- You need an Entra ID account that can create enterprise applications.
- Know your instance name, as in `https://<instance-name>.servicely.ai`.
- Users must already exist in Servicely, for example through [Set up SCIM provisioning from Entra ID](page:access/set-up-scim-provisioning).

Servicely supports three identity provider types: Local, SAML 2.0 and Open ID Connect. This task uses SAML 2.0.

## Steps

<Steps>
  <Step>
    In Servicely, go to **Administration → Authentication → Identity provider** and select **New**.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/image.png">The Identity provider list with the New button.</Image>
  </Step>
  <Step>
    Enter a **Name**. Keep the generated **Client identifier** or enter your own, and select **Create**. The client identifier must be unique, so give non-production copies their own, for example "Entra ID Dev".

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/image-2.png">A new identity provider with its name and client identifier.</Image>
  </Step>
  <Step>
    In the Entra admin centre, go to **Enterprise applications**, select **New application**, then the non-gallery option. Name the application and select **Add**.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/388169732.png" size="48">The form that names a new non-gallery application in Entra ID.</Image>
  </Step>
  <Step>
    Open **Single sign-on** in the new application and select **SAML**.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/image-3.png" size="50">The Single sign-on option in the Entra enterprise application.</Image>
  </Step>
  <Step>
    Select **Edit** on **Basic SAML Configuration**, enter the three URLs in the table below and select **Save**.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/image-5.png" size="54">Basic SAML Configuration filled in for an instance named staging-demo.</Image>
  </Step>
  <Step>
    Open **Users and groups** and add the users or groups who may sign in.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/395706361.png" size="48">Users and groups assigned to the Entra application.</Image>
  </Step>
  <Step>
    Return to **Single sign-on** and download the **Federation Metadata XML** file.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/image-6.png" size="44">The Federation Metadata XML download link in the SAML certificates section.</Image>
  </Step>
  <Step>
    In Servicely, open the identity provider. Paste the whole file into **IDP Metadata XML** and save. Servicely reformats it and fills in **SP Metadata XML**.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/image-7.png" size="58">The identity provider with IDP Metadata XML pasted and SP Metadata XML generated.</Image>
  </Step>
  <Step>
    Check **IDP user attribute** and **SP user field**, and set **Maximum authentication lifetime**. See the second table below.

    <Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/395673599.png" size="40">The IDP user attribute and SP user field on the identity provider.</Image>
  </Step>
</Steps>

Replace `{instance-name}` and `{client_identifier}` with your values:

| Entra setting | Value |
| --- | --- |
| Identifier | `https://{instance-name}.servicely.ai/idp_callback?client_name={client_identifier}` |
| Reply URL | `https://{instance-name}.servicely.ai/idp_callback?client_name={client_identifier}` |
| Logout URL | `https://{instance-name}.servicely.ai/idp_callback?logoutendpoint=true&client_name={client_identifier}` |

| Servicely field | What to enter |
| --- | --- |
| IDP user attribute | The SAML attribute that identifies the user. The default, `id`, carries the user's email address in Entra's default configuration. |
| SP user field | The Servicely user field to match it against. With Entra's defaults this is Email. |
| Maximum authentication lifetime | How long Servicely accepts a SAML token, in seconds. Entra issues the same token for a rolling 90 days by default, so match it with 7776000. |

<Callout type="warning">
  Copy the metadata with a code editor or another tool that treats it as XML. Word processors can add hidden characters that break it.
</Callout>

## Result

Users assigned in Entra ID sign in to Servicely through Microsoft. Servicely finds each user's record by matching the IDP user attribute to the SP user field.

If the Entra session is rolling and outlives **Maximum authentication lifetime**, Servicely rejects the token. Fix this with a Conditional Access policy on the enterprise application (**Security → Conditional access → New policy**) that forces users to sign in again within the lifetime.

<Image src="asset:screenshots/admin/access-sso-microsoft-entra-id/image-8.png" size="50">Creating a Conditional Access policy for the enterprise application.</Image>

Guest users can sign in once their user records are in Servicely. If their user names do not match, change the Entra provisioning mapping for **userName** from **userPrincipalName** to **originalUserPrincipalName**.

## Related

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