Skip to main content

LDAP and SSO

You can let people sign in with their company directory instead of local passwords. The Console supports LDAP (bind authentication with group to role mapping) and browser single sign-on with OpenID Connect (Microsoft Entra ID or a generic OIDC provider). Both issue the same Console session as a local sign-in. Local accounts stay available as a break-glass way in.

Licence feature

Saving and testing LDAP and SSO settings needs the Enterprise licence feature platform.sso. Without it the Console answers MI-5003 (feature not included in the current licence). See Licensing. You need the manage_identity permission (administrators have it).

How it works​

  • The Console finds the user with the User filter, checks the password by binding as that user, reads the Group attribute, and maps groups to roles.
  • All mapped roles are combined (the union). If no group matches, the Default role applies.
  • The account is created at the first sign-in with source ldap. Directory users change their password in the directory, not in the Console.

LDAP​

Settings, Directory (LDAP): connection fields and group to role map
Settings, Directory (LDAP): connection fields and group to role map

Open Settings → Directory (LDAP). The header says: "Configure directory bind auth and map LDAP groups to RBAC roles. Saved settings override environment defaults." The Config source shows Environment or Stored.

Fields and environment variables​

FieldKeyEnvironment variableDefault and notes
Enable LDAPenabledMI_LDAP_ENABLEDOff.
LDAP URLurlMI_LDAP_URLRequired when enabled. Example ldaps://ldap.example.com:636.
StartTLSstartTlsMI_LDAP_START_TLSOff.
Skip TLS verifyinsecureSkipVerifyMI_LDAP_INSECURE_SKIP_VERIFYOff. Lab only; it turns off certificate checks.
Bind DNbindDnMI_LDAP_BIND_DNService account, for example cn=svc,ou=people,dc=example,dc=com.
Bind passwordbindPasswordMI_LDAP_BIND_PASSWORDWrite-only. "Leave blank to keep existing password".
Base DNbaseDnMI_LDAP_BASE_DNRequired when enabled. Example dc=example,dc=com.
User filteruserFilterMI_LDAP_USER_FILTERMust contain %s for the username. Default (uid=%s).
Group attributegroupAttrMI_LDAP_GROUP_ATTRExample memberOf.
Default roledefaultRoleMI_LDAP_DEFAULT_ROLEviewer.
Group → role mapgroupRoleMapMI_LDAP_GROUP_ROLE_MAPJSON object {"group": "role"} in the environment; rows in the UI.

Saved UI settings override the environment. Environment variables are the defaults for a fresh install.

Group to role map​

Each row has a Group DN / name and a role. Use Add mapping and Remove. A key matches a group in one of two ways:

  • a full DN, compared case-insensitively after normalization, or
  • a plain name equal to the CN of the first part of the group's DN.

There is no substring matching: admin does not match sysadmins. A mapping whose role is not a valid role is rejected.

Example for the demo plant, in the environment:

MI_LDAP_ENABLED=true
MI_LDAP_URL=ldaps://ldap.demo-foods.example:636
MI_LDAP_BIND_DN=cn=mii-svc,ou=service,dc=demo-foods,dc=example
MI_LDAP_BASE_DN=ou=people,dc=demo-foods,dc=example
MI_LDAP_USER_FILTER=(sAMAccountName=%s)
MI_LDAP_GROUP_ATTR=memberOf
MI_LDAP_DEFAULT_ROLE=viewer
MI_LDAP_GROUP_ROLE_MAP='{"cn=Line1-Operators,ou=groups,dc=demo-foods,dc=example":"operator","Plant-Admins":"admin","Quality":"auditor"}'

A user in Line1-Operators and Quality gets operator and auditor together. A user in no mapped group gets viewer.

Limit people to a line

To give a directory group access to only part of the plant, use Directory groups and places in the user access dialog. See Users and roles.

Step by step​

  1. Open Settings → Directory (LDAP).
  2. Fill in the connection fields. Prefer ldaps:// or switch on StartTLS.
  3. Add group mappings.
  4. Click Test connection. Then enter Test username and Test password and click Test with username/password.
  5. Switch on Enable LDAP and click Save LDAP settings.

A chip shows the state: "Directory bind auth is enabled", or "Off — local users only" when it is disabled.

Troubleshooting​

SymptomCauseFix
Save fails with MI-5003No platform.sso featureInstall an Enterprise licence.
Test connection failsWrong URL, TLS, or bind DNCheck certificates; test with ldapsearch from the Console host.
User signs in as viewer onlyNo group matchedCheck the Group attribute, and use the full DN or the exact CN.
Nobody can sign inGroup with places exists but the user is in noneSee scoped access in Users and roles.
Locked outDirectory downSign in with the local administrator account.

Single sign-on (OIDC)​

Settings, Azure SSO: issuer, tenant, client and group claim
Settings, Azure SSO: issuer, tenant, client and group claim

Open Settings → Azure SSO. The Console uses the OpenID Connect Authorization Code flow with PKCE (S256) and the scope openid profile email. It works with Microsoft Entra ID and with a generic OIDC provider. When it is enabled and complete, the sign-in page shows Sign in with Microsoft.

Not supported

SAML is not implemented. There is no multi-factor setting in the Console itself; enforce MFA in your identity provider.

FieldKeyNotes
Enable Azure SSOenabled
Issuer URLissuerExample https://login.microsoftonline.com/{tenant}/v2.0.
Tenant IDtenantId
Client IDclientIdFrom the app registration.
Client secretclientSecretWrite-only. "Leave blank to keep existing secret".
Redirect URIredirectUriFor example https://console.example/api/v2/auth/oidc/callback. Must match the app registration exactly.
Group claimgroupClaimThe id_token claim that holds groups. Default groups. In Entra you may need to configure optional claims.
Default roledefaultRoleviewer.
Group → role mapgroupRoleMapGroup id / name to role.

SSO settings are stored in the Console; there are no environment variables for them. A read-only chip shows "Browser SSO login ready — Sign in with Microsoft is available", or tells you to complete the issuer, tenant, client id and redirect URI.

Step by step​

  1. In your identity provider, register an application. Set the redirect URI to https://<console>/api/v2/auth/oidc/callback.
  2. Create a client secret and note Tenant ID and Client ID.
  3. Open Settings → Azure SSO and fill in the fields above.
  4. Add group mappings. In Entra, groups arrive as object ids; use the id as the key.
  5. Switch on Enable Azure SSO and save.
  6. Sign out and check that Sign in with Microsoft appears and works.

REST​

GET, PUT /api/v2/settings/ldap; POST /api/v2/settings/ldap/test; GET, PUT /api/v2/settings/oidc; GET /api/v2/auth/oidc/status, /auth/oidc/login, /auth/oidc/callback.

Limits and good practice​

  • Keep one local administrator account with a strong password and store it safely, for when the directory or identity provider is down.
  • Use ldaps:// or StartTLS. Do not leave Skip TLS verify on.
  • Prefer the minimum default role (viewer).
  • Changes to directory groups take effect at the next sign-in, not during a running session (sessions last at most 12 hours).