docs/main/administration-guide/onboard/sso-saml-entraid.mdx
import Inc0_sso_saml_before_you_begin from './sso-saml-before-you-begin.mdx'; import Inc1_sso_saml_ldapsync from './sso-saml-ldapsync.mdx'; import Inc2_sso_saml_faq from './sso-saml-faq.mdx';
<PlanAvailability slug="all-commercial" />This page provides guidance on configuring SAML with Microsoft Entra ID for Mattermost.
<Tip><Inc0_sso_saml_before_you_begin />
- Identity (Entity ID):
https://<your-mattermost-url>- Reply URL (Assertion Consumer Service URL):
https://<your-mattermost-url>/login/sso/saml- Sign on URL:
https://<your-mattermost-url>/login
- Set the the Unique User Identifier (Name ID) required claim Name identifier format and Source attribute values as required for your environment. Setting the Source attribute to an immutable value such as
user.objectidis recommended.- Edit claim names and namespaces under Additional claims to match SAML attribute settings you wish to set in Mattermost. Configurable settings are Email, Username, Id, Guest, Admin, First Name, Last Name, Nickname, Position, and Preferred Language.
Mattermost matches each attribute by its full claim name, including the namespace, exactly as it appears in the SAML assertion. By default, Entra ID emits its built-in claims under the namespace http://schemas.xmlsoap.org/ws/2005/05/identity/claims/ — so the claim that appears in the Claim name column as emailaddress is actually sent in the assertion as http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress.
This means the value you enter in each Mattermost attribute field (step 15 of Configure SAML Sign-On for Mattermost, below) must be the fully-qualified claim name. Entering only the short name (for example, email or name) will not match, and login will fail with an error such as SAML login was unsuccessful because one of the attributes is incorrect... <attribute> attribute is missing.
You have two options:
email), then enter that same short value in Mattermost; orhttp://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress).Whichever option you choose, the value in Mattermost must match the assertion character-for-character. If a login fails, the safest way to confirm the exact claim names being sent is to capture and decode the SAML response from the browser (for example, with the SAML-tracer browser extension) and read the Name attribute of each <Attribute> element.
mattermost-x509.crt file. The Import dialog says to upload a certificate with a file extension .cer, but .crt files are also accepted. Upload the file then select Add.... to the right of the imported certificate details, select Activate token encryption certificate, then select Yes to activate.https://login.microsoftonline.com/<your-tenant-id>/federationmetadata/2007-06/federationmetadata.xml?appid=<your-app-id>https://login.microsoftonline.com/<your-tenant-id>/saml2https://sts.windows.net/<your-tenant-id>/https://<your-mattermost-url>/login/sso/samlhttps://<your-mattermost-url>mattermost-x509.key file.mattermost-x509.crt file.The Test single sign-on with Mattermost SAML tool in Microsoft Entra ID does not sign the request even if Sign Request is set to True in Mattermost. Depending on your security settings and key length, the Entra ID testing tool may successfully sign in while an actual sign in request from your Mattermost login page results in the error AADSTS90015: Requested query string is too long. since Entra ID handles the initial request with an HTTP GET redirect rather than HTTP POST.
</Note><Inc1_sso_saml_ldapsync />
<Inc2_sso_saml_faq /> :start-after: :nosearch: