Why enforce multi-factor authentication in Mattermost
If you run self-hosted Mattermost and accept email or LDAP sign-ins, a password alone is not enough. Enforcing time-based one-time password (TOTP) MFA adds a second factor that a stolen or reused password cannot satisfy on its own. The control applies to accounts that authenticate against Mattermost's own email login and against LDAP directory login, which are the two methods where the password is checked by Mattermost itself. Your task is to decide whether those accounts need the second factor, who is exempt, and how your team will recover users who lose their authenticator.
TOTP means the user's authenticator app generates a short-lived code from a shared secret and the current time, and Mattermost checks that code at sign-in. That only works if the server and the user's device agree on the time, so clock accuracy on the Mattermost nodes and on the user's phone is a planning item, not an afterthought. Users who have not yet enrolled are affected by enforcement, so confirm with your Mattermost documentation and System Console what enforcement does to them before you switch it on. Confirm also which plan levels include this setting, since plan features change over time and the Mattermost pricing page lists plans, not individual controls.
Where SSO is in use, the picture changes. Accounts that sign in through SAML, OpenID Connect or another external provider are authenticated by that provider, so MFA is normally enforced in the identity provider rather than in Mattermost. Many organizations run both methods side by side, so map every account to its sign-in method before you decide where the second factor lives. Check the current Mattermost documentation and your own System Console for the exact settings and plan requirements, and agree the scope in writing before rollout.
Which MFA settings fit your sign-in model
This table compares three ways to handle MFA for Mattermost: optional for users, enforced for all email and LDAP accounts, and delegated to a SAML or OpenID Connect identity provider. Read each row against your current sign-in method, then confirm the exact System Console labels in your Mattermost version before you change anything. The main takeaway is that enforcement is only as safe as the authenticator and reset process you prepare before turning it on.
| Model | When it fits and who is affected | What to prepare first | Main trade-off |
|---|---|---|---|
| Optional MFA for users | Pilot groups or low-risk deployments where users may opt in. Only users who enable MFA on their own account are affected. | A short authenticator app guide, a note to users explaining the option, and a named contact for lockouts. | Accounts without MFA stay exposed to password theft, and you cannot report on coverage without checking each user. |
| Enforced MFA for email and LDAP accounts | Organizations that sign in with Mattermost-managed email passwords or AD/LDAP credentials and need every account protected. Every affected user must enroll before the next sign-in. | Tested authenticator apps, a clock accuracy check on servers and phones, a communication plan with a cutover date, and a documented reset path through the API or an administrator. | Users who have not enrolled are blocked at sign-in, so the reset process and help desk capacity decide how smooth the cutover is. |
| MFA delegated to a SAML or OpenID Connect provider | Organizations that already run MFA in Entra ID, Okta, Keycloak or another identity provider. Mattermost trusts the provider's sign-in result. | Confirm the provider enforces MFA for the Mattermost application, test desktop and mobile sign-in paths, and review the SSO settings in the System Console. | Mattermost-side enforcement does not apply to these accounts, so you must verify the provider policy and any accounts that bypass SSO. |
| Mixed authentication methods | Deployments where some users sign in with email, others with LDAP and others with SSO. Each group needs its own check. | An inventory of which authentication method each user group uses, and a plan for users who switch methods. | Settings that protect one group may not cover another, which makes audits harder to explain without a per-group record. |
| Admin and API access | System administrators and service accounts that call the REST API or mmctl. Typically separate from end-user rollout. | A list of privileged accounts, a reset procedure that a second administrator can approve, and a plan for service tokens. | Administrator resets are fast but must be logged and tightly controlled, or they become the weakest path. |
How the MFA check sits in the login path
Sign-in starts at the Mattermost server, which checks the password first. If the account has TOTP enrolled, the server asks for a code from the user's authenticator app and checks it before creating a session. If enforcement is on and the account has no MFA, the user is sent to enrollment before any session is issued. SSO users leave this path at the start and sign in at their identity provider, so confirm how the running version handles them against the release notes and your own test accounts.
Email and LDAP sign-in path with TOTP enrollment, code check and session, with the device boundary marked.
Turning on and enforcing TOTP MFA step by step
This sequence moves MFA from a tested pilot to enforcement for all in-scope email and LDAP accounts, with a check at each stage so the enforcement date rests on evidence rather than assumption.
Confirm server version and plan level
The administrator confirms the running Mattermost server version and the subscription plan on the instance, and checks that the MFA controls appear in the System Console for their login methods. Confirm the exact setting names and behavior for that version in the Mattermost documentation or with the vendor before the change window, since MFA behavior can differ between releases. Record the version and plan in the change ticket. Done when the version, plan and available MFA settings are written down and match what the console shows.
Set the enforcement date and rollback owner
Security, identity and service owners agree on the date MFA becomes mandatory and name one person who can reverse the enforcement setting if sign-in breaks. Decide how long users will be warned and how support will handle users who cannot enroll. Settle admin account recovery before enforcement: confirm that at least one system administrator can sign in without relying on the affected login method, and document where recovery credentials are held. Done when the date, owners, warning plan and recovery path are approved in writing.
Test MFA with a pilot group
Select a small pilot group that includes both email and LDAP accounts, and make sure the pilot covers users with different authenticator app preferences and at least one user who signs in from a desktop or mobile client. Enable MFA for the pilot through the settings available for their login method, leaving everyone else unchanged. Check that the pilot users are the only ones prompted. Done when the pilot list is confirmed and the prompt appears only for those accounts.
Enable MFA in the System Console
A system administrator turns on the TOTP-based MFA option for the email and LDAP login methods in the System Console, saves the change and records the time. Confirm that the setting is saved for each login method in scope, since email and LDAP accounts are configured separately. Review the audit log for the configuration change and confirm the entry shows the correct administrator and setting. Done when the settings show as enabled and the audit log entry is present.
Have pilot users enroll an authenticator app
Each pilot user signs in, follows the enrollment prompt, scans the QR code or enters the setup key into a supported TOTP authenticator app, and submits a current code. Confirm the authenticator app choice with the vendor documentation, and check that the time on the user device and the server are accurate, since TOTP codes depend on clock alignment. Track enrollment in a simple count of pilot users who have completed setup against the pilot list. Done when every pilot user is enrolled and the count matches the list.
Verify successful and failed sign-ins
The tester signs in with a pilot account using the correct password and a current code, which should succeed, then repeats the sign-in with a wrong code, which should be refused. Run the same two tests for an email account and an LDAP account, and test a code that has just expired to confirm the time-window behavior. Check the audit log for the sign-in events and confirm that failed attempts are recorded. Done when both expected outcomes appear for each login method and the matching audit entries exist.
Enforce MFA for all in-scope accounts
Once the pilot results are clean and the rollback owner is ready, the administrator applies enforcement to all email and LDAP accounts in scope and announces the change to users. Before the change, record which users have not enrolled so support can reach them. After the change, watch the sign-in failures and support requests for the first hours, and compare the number of enrolled accounts against the full user list. Done when the enforcement setting is saved, the enrollment gap is known, and the audit log shows the change.
Reset MFA for locked-out users through the API
When a user loses their authenticator device, an administrator resets that user's MFA enrollment through the documented API, after confirming the request through your own identity verification process. Confirm the exact endpoint and required permissions in the Mattermost API reference for your version. After the reset, have the user re-enroll and verify a successful sign-in. Record each reset in the support ticket and check the audit log for the entry. Done when the user can sign in again and the reset is traceable.
What enforcement does to users who have not enrolled
Email accounts are the group the enforcement setting most directly governs, because Mattermost checks their second factor itself. A user who has not enrolled a TOTP authenticator app is asked to set one up at sign-in, and that first sign-in after enforcement is where most help desk contact begins. Confirm in your version whether the user is sent straight into enrollment or blocked until enrollment completes, and whether any grace period exists before that point.
- First sign-in after enforcement: expect the user to be prompted to add an authenticator app before reaching channels. Walk through the exact screens on a staging server before the rollout date.
- Lost or replaced phones: users who enrolled on a device they no longer have stay locked out until an administrator resets their MFA. Decide who can perform that reset and how the request is verified.
- Clock drift: a phone with an inaccurate clock produces codes that fail. Expect tickets saying the code is rejected, and tell users to enable automatic time setting on their device.
- Common tickets: 'I never saw the setup screen', 'my code keeps failing', and 'I changed phones'. Prepare a short response for each.
Before writing the rollout message, check which of these behaviors your version shows and record them with screenshots.
LDAP accounts check their password against the directory, so the first factor happens outside Mattermost. Whether Mattermost also prompts these users for a TOTP code, and how that prompt interacts with directory policy, depends on your version and configuration. Confirm this before promising anything to users, because a user who passes directory checks may still face a Mattermost prompt, or the reverse, and both produce confusing tickets.
- Owner of the second factor: agree in writing whether Mattermost, the directory or both enforce MFA, so the help desk knows which system to check first.
- Directory password resets: confirm whether a password reset in the directory affects the Mattermost authenticator enrollment in your environment. Test this with a sample account.
- Users outside the sync scope: people who are not yet provisioned in the directory cannot sign in at all, and their tickets can look like MFA failures.
- Service and automation accounts: confirm whether accounts used for scripts are exempt from the prompt and record that decision with its owner.
Test one LDAP account that has never enrolled and one that has, and record exactly what each sees at sign-in so the help desk script matches real behavior.
When users sign in through SAML or OpenID Connect, the identity provider authenticates them and usually applies its own MFA policy before Mattermost receives the session. Mattermost's SAML single sign-on documentation describes how the provider is connected, but enforcement for these accounts is largely the provider's responsibility. Confirm which MFA settings Mattermost still applies to SSO users in your version before assuming the setting changes anything for them.
- Enforcement sits at the provider: changing the Mattermost setting may have no effect on SSO users. Verify with a test account that signs in through the provider.
- Provider policy changes: an MFA requirement added at the identity provider applies at the next login and can surprise users who were never warned.
- Desktop and mobile clients: confirm how the provider's sign-in page opens in the desktop and mobile apps you support, since users may hit an unfamiliar screen.
- Ticket pattern: the help desk sees identity provider error pages rather than Mattermost screens. Give them the provider's own MFA reset path so they do not route users to the wrong team.
Confirm with your identity team which system owns the second factor for each provider before the message goes out.
Enforcement is mainly felt at sign-in, but accounts that were already active at the time of enforcement raise separate questions. Users with open browser sessions, personal access tokens and integration credentials may continue to work until something expires or is revoked. Confirm in your version whether enforcement ends existing sessions immediately, at their normal expiry, or not at all, because that answer determines when the rollout message should be sent.
- Active browser sessions: confirm whether signed-in users keep access until session expiry, and plan the enforcement date with that window in mind.
- Personal access tokens: confirm whether tokens created before enforcement keep working, since token-based API calls generally skip the interactive sign-in prompt.
- Bot and integration accounts: these usually do not go through interactive sign-in, so list them separately to avoid mistaking them for unenrolled users in reports.
- Immediate revocation: if an account is compromised, use session revocation in the administration console or the API rather than waiting for expiry. Test this procedure before the rollout.
Record your version's exact behavior for each of these cases and give the help desk a one-page reference that matches it.
Where enrollments fail: clock drift, app choice and lockouts
Most MFA enrollment problems in Mattermost trace back to a few predictable causes: device clocks, unplanned authenticator apps, lost devices and lockouts after repeated failed codes. Each card gives the symptom, the check to run, the fix and the decision your team should make before enforcement starts.
Clock drift breaks TOTP codes
A TOTP code is valid only for a short window tied to the device clock, so a phone or laptop several minutes off will reject codes that look correct. The symptom is a user who types the current code from the app and sees it refused, often on a newly set up or rarely updated device. Check the device's automatic time setting and compare its clock with the Mattermost server clock. Decide in advance that every enrolled device must use network time sync, and document who supports users whose devices are managed outside IT.
Mattermost SSO docsUnapproved authenticator apps
Users choose whatever authenticator app their app store offers, and some apps handle account export, backup or secret storage in ways your security team has not reviewed. The symptom is a mix of apps across the user base, with support tickets that vary by app. Confirm the supported authenticator app list in the current Mattermost documentation before publishing guidance, then name approved apps in your enrollment instructions. Decide in advance which apps are approved for managed and personal devices.
Lost or replaced devices
When the enrolled phone is lost, replaced or wiped, the user can no longer produce codes and cannot finish sign-in. The symptom is a user locked out of an account that was working the day before, often right after a phone upgrade. Check whether the user's MFA enrollment still exists in the System Console and whether the account is blocked by policy. Decide in advance who verifies identity before an admin resets MFA, and how the reset is recorded. Resets through the API should follow the same approval path as console resets.
Lockouts after repeated failed codes
Repeated wrong codes, often from clock drift or a mistyped code, can trigger a temporary lock on the account. The symptom is a user who was correct on the last attempt but now sees a generic failure or a wait message. Review the failed login entries in the server logs and confirm the current lockout threshold and lockout duration in the Mattermost documentation for your version. Decide in advance who unlocks accounts, how users are told to wait, and when a repeated lockout should be escalated as a possible attack.
Enrollment left to individual users
If enrollment is optional until enforcement, many users will postpone it, and enforcement then removes access on a day you did not plan for. The symptom is a rising count of users without MFA close to the enforcement date. Before enforcing, check which accounts have not enrolled and send them enrollment instructions with a support contact. Decide in advance the enrollment window, the reminder schedule and whether any role, such as system admin, must enroll before anyone else.
Resetting a user's MFA through the API
A help desk needs to clear a user's TOTP enrollment in three common cases: the user lost the device holding their authenticator app, they have moved to a new phone, or a former employee has returned and must re-enroll. The reset is performed through the Mattermost API by an administrator account, and the reset should leave a record in your audit trail. Before any reset, the help desk must verify the requester's identity through a channel the attacker cannot easily control, such as a call-back to the number on the HR record or an in-person check, not a chat message or an email reply. Someone who can reset MFA for a user holds a path around the second factor, so treat this step as a security control, not a courtesy.
Limit which accounts can perform resets. Use a small set of named system administrator accounts for MFA resets rather than the shared or everyday admin account, and require that each reset is tied to a ticket that records the requester, the approver and the reason. Keep the scripts or commands used for the reset in version control so the steps are repeatable and reviewable. Confirm the exact endpoint, the permissions required to call it, and the response behavior in the Mattermost API reference for your server version before you write any runbook, because these details change between releases. Test the full reset on a staging server first, including what the user sees at their next login.
After a reset, the user should re-enroll their authenticator before they perform any sensitive action, and your runbook should say which actions count as sensitive for your organization. Confirm during testing whether a reset ends existing sessions, since a session that stays active after the reset would undermine the purpose of the check. Record each reset with the date, the account, the requester, the verifier and the ticket, and review those records periodically for repeated resets on the same account, which can indicate a compromised password or social engineering.
Security and operational considerations for MFA enforcement
Turning on MFA changes more than the login screen. The secret store, admin recovery, logging, session handling, cluster consistency and change control all determine whether enforcement holds up under review. The cards below name the control, why it matters to a CISO or compliance lead, and what to confirm in your environment before enforcement goes live.
Protect the TOTP secret store and backups
TOTP enrollment stores a shared secret per user in the Mattermost database, so anyone who can read that data or a database backup can generate valid one-time codes. Confirm who can reach the PostgreSQL primary, read replicas and backup repositories, whether backups are encrypted at rest, and how long backup copies persist. Treat restored databases as sensitive, and check that a restore does not silently bring back users with stale or weaker MFA state.
Break-glass access for admin accounts
Enforcing MFA on administrators is where lockouts become incidents. Decide in advance which accounts hold system admin rights, how many can recover another admin's authenticator, and where emergency credentials are kept. Confirm that at least one break-glass path exists that does not depend on the authenticator being recovered, that its use is logged, and that it is tested before enforcement rather than during an outage.
Log enrollment and reset events
Enrollment, removal and administrator resets of MFA are the events an auditor will ask to see. Confirm which of these actions appear in Mattermost audit logs, where those logs are shipped, how long they are retained, and who can alter them. Set alerts for bursts of resets on a single account or resets performed outside a change window, since these patterns often precede account takeover.
Align session lifetime and API tokens
MFA at sign-in does not govern sessions that are already open or personal access tokens issued before enforcement. Confirm the session length settings, whether an existing session survives after a user's authenticator is reset, and which integrations use personal access tokens or bot accounts that bypass interactive login. Review those tokens for owners, scope and expiry, and decide whether they need rotation when MFA is enforced.
Keep settings consistent across cluster nodes
In a high availability cluster, each application server must apply the same authentication configuration. A node that runs with older settings can accept logins that the others reject, which makes enforcement look inconsistent and complicates investigation. Confirm that configuration is delivered from one source to every node, that the cluster is restarted or reloaded as your documentation requires, and that a post-change check confirms the same behavior on each node.
Route MFA changes through change control
Changing MFA policy affects every user, so it should follow the same approval and record-keeping as other security configuration. Confirm the owner of the policy, the approval required before enforcement, the test accounts used for validation, the communication sent to users, and the rollback step if enforcement blocks work. Keep the change record with the configuration history so a compliance reviewer can see when the control was introduced and by whom.
Questions buyers ask before enforcing MFA in Mattermost
How much effort does MFA enforcement take for a small user base versus a large one?
The technical change is small in both cases, but the effort scales with how many people must enroll and how many of them will need help. A small team can usually enable TOTP, announce a date and handle enrollment questions in a few conversations. A large user base adds more enrollment support, more device types, more help desk contacts and more follow-up with users who never enroll before enforcement applies. Effort also grows if the organization has several account types, such as email accounts alongside LDAP accounts, because each path needs its own check. Ask any partner to split its estimate into configuration, pilot, enrollment support and post-enforcement follow-up so you can see where the hours go.
Can our own team enforce MFA in Mattermost without outside help?
Often yes, if one or two administrators have System Console access, can test on a non-production server and can run a help desk process for enrollment. The steps are documented in the product and the controls are not difficult to configure. Outside help tends to make sense when the organization needs a written change plan for a regulated environment, has SSO or AD/LDAP accounts that interact with MFA, needs evidence for an assessment, or lacks staff to run a pilot and support users during the cutover. Decide based on your own capacity and risk tolerance, and confirm that your plan supports the MFA controls you need.
What does the work need from our organization before it starts?
Plan for four inputs. First, administrator access to the Mattermost System Console and, where relevant, the server and database so changes can be applied and verified. Second, a pilot group of users from different teams who can test enrollment with their own authenticator apps and report problems. Third, a help desk plan that names who answers enrollment and lockout requests, what identity checks apply before a reset, and how after-hours requests are handled. Fourth, a change window that avoids busy periods and gives users a clear date before enforcement starts. Your security team should also agree in advance which account types and user groups are in scope.
How far in advance should we plan an MFA rollout in Mattermost?
Plan the rollout around its stages rather than a single switch: scoping, a non-production test, a pilot, user communication, enrollment, and enforcement. The time each stage needs depends on your user count, how many account types you run, your change approval process and how quickly your users respond to notices. Ask a partner for a schedule that lists each stage, its owner and its exit criteria, and confirm that the schedule accounts for your change board and any holiday or release freeze. Do not accept a timeline that skips the pilot or the help desk preparation.
What drives the cost of MFA enforcement up or down?
Cost follows the work, not the setting. The main drivers are the number of account types that need MFA (for example, email accounts and LDAP accounts), any overlap with SSO sign-in that changes where MFA is applied, the expected volume of lockouts and device resets, the number of user groups and approval steps, and whether high availability or other infrastructure changes must be validated during the change. One-time costs include scoping, configuration, testing and communication. Recurring costs include help desk time and periodic reviews of reset requests. Your internal staff time is also a cost, even when no invoice exists. Pricing from a partner should be quoted from a written scope.
Which Mattermost plan do we need for SSO and LDAP-based MFA?
Mattermost's pricing page lists SSO (SAML, OIDC and OAuth) and AD/LDAP user sync from the Professional plan, and high availability clustering and FIPS 140-3 compliance from Enterprise. The pricing page does not publish prices and directs buyers to contact sales, and Mattermost sells these plans as prepaid annual subscriptions based on seat licenses. Confirm with Mattermost which plan includes each MFA control, enforcement option and reset capability you plan to use, because plan requirements can differ by feature and by server version. Ask the vendor to put that answer in writing before you choose a plan.
What should a written quote for MFA enforcement include?
A useful quote lists the scope in specific terms: which Mattermost server and environment are covered, which account types and user groups are in scope, which MFA settings will be configured, and whether SSO or AD/LDAP interactions are included. It should name the deliverables, such as a configuration record, a test report, a help desk runbook and a rollback plan. It should state the schedule, what you must provide, and what happens if the pilot finds problems. Ask who performs each task, what is one-time and what recurs, whether a retest or post-enforcement review is included, and how changes requested mid-project are priced. Fixed-scope work agreed in writing before it starts makes these terms easier to compare.
Limits to confirm in your environment before enforcing
Enforcing MFA changes how every account signs in, so the limits below decide whether the setting protects the accounts you care about or leaves gaps. Confirm each one against the documentation for your exact server version, with your Mattermost account team where plan questions apply, and on a test server before changing production.
Account types the setting covers
The TOTP MFA setting is documented for email and LDAP accounts, so confirm which account types your running version actually enforces it for. Check whether accounts created through other sign-in methods, bot accounts, and guest accounts are included. Create one test account of each type on a test server, enable enforcement, and record which accounts are prompted and which are not. Any type left out needs a compensating control in your identity provider.
SAML docsSSO accounts and upstream MFA
Accounts that sign in through SAML or OpenID Connect normally authenticate at the identity provider, so Mattermost's TOTP setting may not apply to them. Confirm with your identity team that MFA is required at the provider for every group that can reach Mattermost, including conditional access rules that apply to the Mattermost application. Ask Mattermost documentation how the server behaves for SSO users when the setting is on, and test it with a real SSO login.
Authenticator apps and clock sync
TOTP codes depend on the server and the phone agreeing on the current time, so clock drift causes failed logins that look like bad codes. Confirm which authenticator apps Mattermost documents as supported for your version, and test enrollment with each app your users will choose. Make sure the Mattermost host and user devices sync to a trusted time source, and document a recovery path for users whose devices drift.
Plan level for the feature
Confirm with Mattermost sales which plan includes MFA enforcement for email and LDAP accounts, because feature availability differs by plan. Ask whether the setting depends on any other licensed capability, such as directory sync, and get the answer in writing before you plan rollout. Plan tiers are listed on the pricing page, but the pricing page does not show which controls each tier includes in detail.
Mattermost pricingBehavior across mobile and desktop clients
Enforcement may behave differently in the web app, the desktop app, and the mobile apps, and some clients may cache sessions or prompt users at different points. Test a full sign-in on each client your organization uses, including a session that was open before enforcement began. Record what each client asks for, and tell users in advance which app will prompt them for a code.
Changes across monthly and ESR upgrades
Mattermost ships a new server build monthly and also publishes Extended Support Releases, so MFA behavior can change between the version you test and the version you run later. Read the release notes for each version between your current build and your target, and repeat the MFA test after every upgrade. Confirm the support end date for your version so the test cycle matches your patch schedule.
Server releasesHow DeployOpen scopes and delivers MFA enforcement
DeployOpen approaches MFA enforcement in Mattermost as a scoped piece of work inside your own infrastructure, starting from which account types, authenticator apps and user groups need coverage. We agree the scope in writing, configure and test the enforcement settings on a non-production instance, and document the procedures your administrators will follow. Ongoing support and upgrades can be added as a retainer.
How we scope
- Confirm which accounts are email-based and which are LDAP-based, since enforcement covers both in this topic.
- Agree which authenticator apps your users are permitted to use and how clock accuracy will be checked.
- Define the rollout order, the user communication plan and who approves enforcement before it reaches production.
How we build
- Enable TOTP-based MFA in the System Console on a staging Mattermost server that mirrors your production configuration.
- Test sign-in for users with and without enrolled authenticators, including the behavior of enforcement for users who have not yet enrolled.
- Set up the API-based reset procedure with scoped administrator credentials and record how each reset is logged.
How we hand over
- Deliver written runbooks covering enrollment, lockout recovery, password-reset-to-MFA-reset steps and clock troubleshooting.
- Provide the test scripts and results so your security and compliance teams can review the enforcement evidence themselves.
- Walk your administrators through the production change, the rollback plan and the escalation path for locked-out users.
How we support
- Engagements are fixed-scope, so changes after the agreed scope are quoted separately in writing.
- Ongoing support, upgrades and periodic re-testing of MFA settings are available as a retainer after handover.
- Confirm with your team how support requests, change approvals and incident response will be routed during the retainer.

