Docs
On this page
task3 min readApplication: Single Sign-On

Set up single sign-on with Microsoft Entra ID

Connect Servicely to Microsoft Entra ID with SAML 2.0 so users sign in with their Microsoft account.

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.

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

Steps

  1. In Servicely, go to Administration → Authentication → Identity provider and select New.

    The Identity provider list with the New button.
  2. 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”.

    A new identity provider with its name and client identifier.
  3. In the Entra admin centre, go to Enterprise applications, select New application, then the non-gallery option. Name the application and select Add.

    The form that names a new non-gallery application in Entra ID.
  4. Open Single sign-on in the new application and select SAML.

    The Single sign-on option in the Entra enterprise application.
  5. Select Edit on Basic SAML Configuration, enter the three URLs in the table below and select Save.

    Basic SAML Configuration filled in for an instance named staging-demo.
  6. Open Users and groups and add the users or groups who may sign in.

    Users and groups assigned to the Entra application.
  7. Return to Single sign-on and download the Federation Metadata XML file.

    The Federation Metadata XML download link in the SAML certificates section.
  8. 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.

    The identity provider with IDP Metadata XML pasted and SP Metadata XML generated.
  9. Check IDP user attribute and SP user field, and set Maximum authentication lifetime. See the second table below.

    The IDP user attribute and SP user field on the identity provider.

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.

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.

Creating a Conditional Access policy for the enterprise application.

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.

Last updated 18 October 2026commit c05803eee2ceChris Jones
Back to top