Slightly bothersome, but you can use gitlab as a SSO provider for mattermost, and gitlab can be easily (free) integrated with LDAP.
> Only the default GitLab SSO is officially supported. “Double SSO”, where GitLab SSO is chained to other SSO solutions, is not supported. It may be possible to connect GitLab SSO with AD, LDAP, SAML, or MFA add-ons in some cases, but because of the special logic required they’re not officially supported and are known not to work on some experiences. If having official AD, LDAP, SAML or MFA support is critical to your enterprise, please consider Mattermost Enterprise Edition as an option.
I am using it currently with freeipa with zero issues.