Docs
AccessGroups

Entra SSO Setup

Register and configure an application in Microsoft Entra ID so users can sign in to Lunr with single sign-on (SSO) using OpenID Connect.

Overview

OpenID Connect (OIDC) is the preferred SSO integration method for Lunr. This page describes how to register and configure an application in Microsoft Entra ID so that users can sign in to Lunr with SSO.

You complete the steps in the Microsoft Entra admin portal. At the end, you send these details to your nominated Lunr contact: the client secret, the application ID, the tenant ID, and the value of each app role you created.

Users who sign in this way appear in Lunr with an SSO badge. See Users and Groups.

Register an Application

  1. Sign in to the Microsoft Entra admin portal and select the App registrations blade.
  2. Register a new application. Name it Lunr SSO, or follow your company's naming standards.

Entra ID Register an application page for the Lunr SSO application

Configure Redirect URIs

In the Lunr SSO application, select the Authentication blade, then configure these redirect URIs for each Lunr environment and platform.

Lunr environmentPlatformRedirect URI
StagingWebhttps://documents-stg.lunr.app/auth.html
StagingMobile and desktop applicationscom.onset.lunr.preview://login
ProductionWebhttps://documents.lunr.app/auth.html
ProductionMobile and desktop applicationscom.onset.lunr://login

This screenshot shows the redirect URIs configured for the Lunr production environment.

Entra ID Authentication blade showing the redirect URIs configured for the Lunr production environment

Create App Roles

App roles are configured on the Entra ID application. They decide which Lunr SSO group each user joins. Each time a user signs in, Entra passes the user's app roles to Lunr, and Lunr adds the user to the matching SSO group. The user's Lunr roles then come from that group. See Groups.

In the Lunr SSO application, select the App roles blade, then create the app roles agreed during the solution design phase of your project. The app roles in this table are examples only, to show how the fields are filled in.

Display nameAllowed member typesValueDescription
ContractorUsers/GroupsContractorContractor user role
Document ControllerUsers/GroupsDocumentControllerDocument Controller user role
EmployeeUsers/GroupsEmployeeEmployee user role

Entra ID App roles blade listing the Contractor, Document Controller, and Employee app roles

Entra asks for all four fields, but only the value is passed to Lunr:

  • Display name: the name Entra admins see when they assign the app role to users and groups. It can contain spaces. Entra does not send it to Lunr.
  • Allowed member types: who the app role can be assigned to. Choose Users/Groups so you can assign it to users and groups in the next step.
  • Value: the text Entra sends to Lunr when a user signs in. Lunr matches it to an SSO group. It cannot contain spaces. Capital letters do not matter, but the spelling must exactly match the value your Lunr contact sets up.
  • Description: a longer explanation that Entra admins see when they assign the app role. Entra does not send it to Lunr, so use it to tell your own admins what the app role is for.

Send the value of each app role to your nominated contact, so each value can be matched to a Lunr SSO group. If none of a user's app roles match an SSO group, Lunr adds the user to the default SSO group.

Changing a value breaks the match

If you change an app role's value after Lunr is set up, users with that app role no longer match their SSO group and move to the default SSO group the next time they sign in. Send the new value to your nominated contact before you change it. Disabling an app role in Entra does not stop Entra sending it. To stop a user receiving an app role, remove the app role from the user or group.

Add Users and Groups

Users must be added to the Entra ID application before they can sign in to Lunr with SSO. When you add a user or group, also assign an app role, so the user joins the matching SSO group in Lunr when they sign in.

  1. In the Microsoft Entra admin portal, select the Enterprise apps blade.
  2. Search for and open the Lunr SSO application.
  3. Select the Users and groups blade.
  4. Add the users and groups, and assign an app role to each.

Entra ID Users and groups blade showing a group assigned to the Lunr SSO application with an app role

Add the users and groups agreed during the solution design phase of your project. To confirm that SSO works before then, a generic Entra group created for testing is enough.

Lunr does not support nested AD groups.

Create a Client Secret

  1. In the Lunr SSO application, select the Certificates & secrets blade.
  2. Select New client secret and create the secret. Consult your cybersecurity team to choose an appropriate expiry.
  3. Copy the secret from the Value column and send it securely to your nominated contact.

Entra ID Add a client secret panel for the Lunr SSO application

Entra ID Certificates & secrets blade showing the new client secret and its value ready to copy

Entra shows the full secret value only once, straight after you create it. Copy it before you leave the page. Create a new secret before the current one expires, and send the new value to your nominated contact, because SSO sign-in stops working once the secret expires.

Copy the Application ID

In the Lunr SSO application, select the Overview blade, then copy the Application (client) ID and send it to your nominated contact.

Entra ID Overview blade showing the Application (client) ID of the Lunr SSO application

Copy the Tenant ID

On the same Overview blade, copy the Tenant ID and send it to your nominated contact. Microsoft's documentation sometimes calls this the Directory ID.

On this page