Single sign-on (Microsoft Entra ID)
Let users sign in with their company account through Microsoft Entra ID or another OpenID Connect provider.
Single sign-on (SSO) is set for the whole installation. Only the identity administrator sees Settings → Authentication; being owner or administrator of an organisation does not give this access. Business permissions stay managed in each organisation.

1. Prepare Entra ID
- In Entra ID, register a Web application limited to the accounts of your directory. Note the Directory (tenant) ID and the Application (client) ID. Use your own tenant, not
common,organizationsorconsumers. - Register exactly
https://your-instance/api/auth/oidc/callbackas Web redirect URI. Scalengi uses the authorization code flow with PKCE and asks for theopenid email profilescopes; no Microsoft Graph permission is needed. - Make sure the ID token carries the
emailclaim. Restrict the enterprise application to the people allowed, and apply your MFA and Conditional Access policies in Entra. - Create a client secret and give it only to the identity service, through your secret manager: variable
SCALENGI_OIDC_CLIENT_SECRET, or a file named bySCALENGI_OIDC_CLIENT_SECRET_FILE(mode0600). Restart the identity service after adding or rotating it.
2. Turn it on in Scalengi
Keep an administrator session signed in with a local password while you configure. In Settings → Authentication:
- Choose Microsoft Entra ID (Azure AD) as SSO provider.
- Enter the Microsoft tenant ID and the Client ID. The OIDC issuer is derived from the tenant and shown on one line.
- Copy the Callback address shown into Entra ID if you have not already.
- When the panel confirms that the client secret is configured on the server, tick Enable SSO sign-in and save.
Advanced options hold the allowed email domains, the email of the initial SSO administrator, Create an account on first SSO sign-in and Keep local password sign-in. Creating an account gives it no organisation and no business permission; groups and roles from Entra are not imported.
For another provider, choose Other OIDC provider and enter its name and its issuer URL.
3. Link existing accounts
An existing local account is linked in My account → Link my account to SSO: confirm the local password, then sign in with the provider using the same email address. The account keeps its identity and memberships; its older sessions are signed out.
4. Check, then remove the local fallback
Test a new SSO sign-in in a private window: an authorised user signs in, a user from another tenant or not assigned is refused, MFA applies, and a new account has no business access before being added to an organisation.
Remove local password sign-in only after at least one active administrator has been linked and has signed in with SSO. The server refuses to remove the last administrator path.