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
- 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. - 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. - 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.
