Mattermost SSO with Microsoft Entra ID (SAML)

Use an Entra enterprise application for Mattermost SAML; NameID and Mattermost account binding are separate settings.

Last updated

On this page (5)

Mattermost · Microsoft Entra ID · SAML

Before you start

  • Mattermost Entry, Professional, Enterprise, or Enterprise Advanced per the upstream SAML guide.
  • Entra enterprise app administrator, HTTPS Mattermost URL, and a recoverable administrator login.

Configure sign-in

  1. Create a SAML enterprise application in Entra and assign only pilot users. Match Mattermost’s service-provider entity ID to Entra’s Identifier (Entity ID) and set Reply URL to https://<mattermost-host>/login/sso/saml. Keep the public host consistent with Mattermost’s configured Site URL.
  2. Emit the email and username attributes expected by Mattermost and a separate identifier claim from user.objectid. Use SHA-256 and sign the SAML response and assertion as Mattermost specifies. Copy the claim names as they appear in the assertion, including namespaces if present; a profile-field label is not necessarily the outgoing claim name.
  3. In System Console > Authentication > SAML 2.0, configure the IdP values and signing certificate from the enterprise application. Follow Mattermost’s guide for the Application ID, and enter the exact Email, Username and ID attribute names. NameID and the Mattermost ID attribute are separate settings. If users already sign in through another method, plan account conversion and test the original user’s channels and team membership before switching; do not change the identifier on an established SAML population without a migration plan.

Verify the result

  • An assigned existing user reaches the same account and retains team membership; renamed email does not create a second account or rebind a recycled address.
  • Test unassigned users and signing certificate rollover. Separately test session removal on desktop/mobile and AD/LDAP sync entitlement and matching IDs if using it; SAML authentication alone does not provide lifecycle sync.

Official documentation

Have Pilae connect your identity provider

Pilae can deploy Mattermost with your identity provider already connected. We agree the edition, account mapping and access tests with your team before rollout.