Mattermost user provisioning and deprovisioning

Choose how accounts are created and removed in self-hosted Mattermost, and what each method needs from your identity sources and your team.

On this page

Mattermost user provisioning and deprovisioning: when each method fits

If you run a self-hosted Mattermost server, you need joiners to reach it on their first day and leavers to lose access promptly. Provisioning covers how accounts are created in Mattermost, and deactivation covers how they are removed, and the right method depends on your identity source and your plan. Mattermost offers three creation routes: on-demand creation at first login, where an account is made when a user signs in through a configured identity provider; pre-provisioning with bulk import or the REST API, where accounts exist before anyone signs in; and sync from a directory. Deactivation runs through AD/LDAP sync or manually in the System Console.

The plan decides which of these you can use. Mattermost's pricing page places SSO (SAML, OIDC, OAuth) and AD/LDAP user sync from the Professional plan, so a team on a lower tier should confirm with Mattermost sales whether it has directory sync at all before designing around it. Ask your vendor contact which features your specific subscription includes, because the pricing page describes plan levels, not your contract terms.

Start by listing your identity source of truth and whether it can tell you when someone leaves. If your directory is the authority, pair directory sync with SSO so that deactivation follows the directory. If you use a standalone identity provider without directory sync, on-demand creation is simple, but leavers must be deactivated in the System Console or through the API as part of your offboarding checklist. Test both paths with a disposable account before go-live, and record who owns each step so that no leaver remains active after an HR event.

Provisioning and deprovisioning options and when each fits

This table compares the five ways accounts are created and removed in self-hosted Mattermost: on-demand creation at first login, bulk import, the REST API, AD/LDAP sync and manual deactivation in the System Console. Read each row to see what triggers creation and deactivation, who runs it, and which organizations it suits. Confirm exact behavior for your server version in the Mattermost documentation before you rely on it.

OptionWhat triggers creation and deactivationWho runs it and when it fits
On-demand at first loginCreation: a user signs in through an enabled authentication method. Deactivation: no built-in trigger; an admin or sync must act.Users run it themselves. Fits small teams with low leaver risk, but leavers remain active until someone deactivates them.
Bulk importCreation: an import file (JSONL) processed by mmctl or the import tooling. Deactivation: not a removal trigger; rerun the import or use another method.Admins run it during onboarding or migration. Fits pre-provisioning before go-live and moving history from another chat system.
REST APICreation: a call to the user endpoints by an authorized integration. Deactivation: an API call that marks the account inactive.Your identity tooling or scripts run it. Fits organizations that already automate joiner and leaver workflows and want custom logic.
AD/LDAP syncCreation: directory users matched by the configured ID attribute. Deactivation: accounts no longer found or filtered out in the directory are deactivated on sync.The directory team controls membership, and Mattermost follows it. Fits organizations that govern access in Active Directory or LDAP. Confirm sync interval and filter behavior for your version.
Manual deactivation in the System ConsoleCreation: not applicable, accounts are created by another method. Deactivation: an admin deactivates the user in the console.A system admin acts on a case-by-case basis. Fits exceptions, urgent revocations and small deployments, but it does not scale to frequent leavers.

Which identifier each login method keeps stable

Mattermost matches a returning user to an existing account by an identifier, and that identifier decides whether an account survives a rename, a re-login or a change of identity provider. The four identity paths handle this differently, so the choice of login method shapes how provisioning and deprovisioning work.

SAML identifier mapping

With SAML, Mattermost maps the user to an account using the identifier the identity provider sends in the assertion. If the identity provider can change that value, for example when an address or username is reissued, Mattermost can create a second account instead of matching the first. Confirm in the SAML settings for your version which attribute is used as the ID, and check that the identity provider sends it unchanged for every user.

SAML SSO docs

OpenID Connect subject matching

OpenID Connect logins rely on an identifier the provider owns, and the mapping that Mattermost stores can differ from the username or email a user sees. Changing the provider, its tenant or the client registration can produce a new subject for the same person. Confirm which claim your version of Mattermost uses for the account link, and test whether a renamed user still signs in to the same account.

AD/LDAP directory identifier

Directory login and sync are designed around an attribute that does not change when a person is renamed or moved between organizational units. Mattermost uses this value to keep the account linked to the directory entry, which matters for both profile updates and deactivation of leavers. Ask your directory team which attribute is immutable in your forest, and confirm in the Mattermost LDAP documentation for your version that it is the one configured.

Email login matching

Email and password accounts are matched on the email address, so a rename of the address is effectively a new login identity unless the account is updated first. This makes email the weakest path for surviving renames. If you use email login for any group, plan an address-change procedure and confirm how your version handles the update before the first change happens.

Mixed methods and migration

When users move from one login method to another, the stored identifier must still point to the same person. The migrate-auth command in Mattermost matches users, and a mapping file controls how the match is made. Run a dry run and review the matches before any change, because a mismatch can leave an active user with no working sign-in path.

Pilot test for renamed users

Before rollout, create a test account for each login method, rename it in the source system, and sign in again. Check that the same Mattermost account, channels and message history remain attached, and that deactivation still applies to the right user. Record the attribute values at each step so the team can see what changed and where.

How a joiner and a leaver move through Mattermost

The diagram starts at the HR or directory change and follows it into Mattermost, where the account is created or deactivated. The identity provider and the Mattermost server are separate trust boundaries, so the hand-off between them is where provisioning decisions matter. Check that the stable user identifier from the auth method is the same before and after any change, and that deactivation removes sign-in while the message history stays attached to the account.

Joiner and leaver paths, with the identity provider and server as separate trust boundaries.

How to set up provisioning in a Mattermost deployment

This sequence sets up one authoritative source for every Mattermost account, a stable login identifier, and a tested path for creating and removing users. It ends with a joiner and a leaver confirmed in the System Console and a deactivated account that cannot sign in or post.

  1. Name the authoritative source for each user

    Decide which system owns the identity record for employees, contractors and guests, usually the corporate directory or the identity provider that already drives joiner and leaver processes. Agree with HR or the identity team who creates and disables those records, and whether Mattermost will ever hold accounts that have no entry in that source. Record the answer in writing. The step is done when every user category has a named owner and a stated removal trigger.

  2. Choose the login method and its identifier

    Pick the sign-in method that matches the authoritative source, such as AD/LDAP, SAML, OpenID Connect or email login, and confirm which attribute the method uses as the unchanging ID. Check that the identifier will not change when a person changes name, email or department, because a changed identifier can create a second account and split message history. Confirm the method and its plan requirements in the Mattermost pricing and SSO documentation before you commit. The check is a short table mapping each user category to its method and identifier, signed off by the identity owner.

  3. Configure the directory or SSO connection

    The Mattermost administrator configures the chosen connection in the System Console, using a test environment first, and sets the attribute mappings that the identifier depends on. For directory sync, set the filters so that only the intended population is in scope, and confirm how the sync treats disabled accounts in the source. Run a manual sync or a first login with a test account and review the resulting profile. The check is that the test account appears with the expected username, email and ID, and that the directory sync log records the run without errors.

  4. Decide between pre-provisioning and first-login creation

    Choose whether accounts are created on first sign-in or ahead of time through bulk import or the REST API. First-login creation is simpler but leaves no record until someone signs in, so access reviews and team membership may need separate handling. Pre-provisioning lets teams and channels be populated before people arrive, but it adds an import step that must run on the same identifiers as the login method. Document the choice per user category, and confirm the import file format and API calls against the version you run. The check is a written decision and a dry run that creates one account with the correct identifier.

  5. Run a pilot with a joiner and a leaver

    Using a small test group, create one joiner in the authoritative source and confirm that the account appears in Mattermost through the chosen path. Then disable a second test user in the source and let the sync or the console action run. Watch the directory sync log and the System Console user list during this step. The check is that the joiner can sign in and the leaver shows as inactive in the System Console, with a matching entry in the sync log for the change.

  6. Verify that deactivated accounts cannot sign in or post

    Using the test leaver, attempt a web sign-in, a desktop or mobile sign-in if those clients are in use, and an API call with any session or token the account held before deactivation. Confirm that the sign-in is refused, that existing sessions are no longer usable, and that the account cannot post in a channel. Record the result for each path. The check is a written test log showing a refused sign-in, a refused API request and no new posts from the deactivated account, reviewed by the security owner before rollout.

  7. Document the run book and schedule recurring checks

    Write down the steps the team will repeat for joiners and leavers, including who triggers each action, where the sync log is reviewed and how failed syncs are escalated. Add a recurring check that compares active Mattermost accounts with the authoritative source, and confirm the process for contractors and guests whose records may end on a different schedule. The step is complete when the run book has been walked through by the operations and identity owners and the first recurring review has a named owner.

How deprovisioning differs by sign-in method

With SAML or OpenID Connect, the identity provider decides whether a user can sign in, but Mattermost only learns about the decision when someone tries to log in. Disabling the user in the identity provider stops new sign-ins, yet an existing Mattermost session can remain valid until it expires, and the account stays active in Mattermost's user list. Deprovisioning therefore depends on what else is connected to the identity provider.

  • No directory sync by default: SAML or OpenID Connect alone does not deactivate leavers in Mattermost or refresh their profile attributes on a schedule.
  • Session behavior: Confirm how long sessions last and whether revoking sessions is needed for a leaver with active devices.
  • Desktop and mobile clients: Check which clients stored credentials or tokens for the leaver and how they are cleared.
  • Combined setups: Where AD/LDAP sync runs alongside SAML, leavers are deactivated through the directory; see the sibling topic on combining Mattermost SAML with AD/LDAP sync.
  • Provider-specific steps: Follow the sibling topics for Microsoft Entra ID, Okta, AD FS, OneLogin, Google Workspace, GitLab and generic OpenID Connect providers for their own configuration.

Before relying on the identity provider alone, confirm in a test that a disabled user cannot sign in and that the account's status in the System Console matches what the administrator expects.

Why a single sign-on login alone can leave leavers active

When a user is removed from the identity provider, that user can no longer start a new sign-in to Mattermost. The gap is that the Mattermost account itself stays in the user list as active unless something changes it. SAML and OpenID Connect sign-in do not, by themselves, push deactivations, periodic attribute updates or group changes into Mattermost. A leaver can therefore remain visible in channels and directories, keep an existing session open for as long as that session lives, and carry profile fields such as email, name or role that no longer match the directory. Before go-live, the team should confirm which sign-in method it uses and whether any directory sync runs alongside it, because that determines which of these gaps exist.

Close the gap with three controls. First, directory-driven deactivation: where the directory is the source of truth, enable AD/LDAP synchronization so that accounts for users removed from the directory are deactivated on the next sync. Second, regular access reviews: export the active user list and compare it against the current directory or HR roster, and act on accounts that have no matching identity, with the review cadence set by your own policy. Third, session expiry checks: confirm the session lifetime and any token lifetimes in the System Console for your installed version, and test that a deactivated account cannot continue an existing session. Mattermost's documented behavior for each of these settings varies by version, so the team should verify the exact values and defaults in its own configuration and in the release notes for the version it runs before relying on them.

Security risks in account creation and removal

Account creation and removal are where Mattermost access is granted and withdrawn, so gaps here leave people with access they should not have. The risks below connect because each one depends on knowing who holds an account, what that account can do, and who answered for the change.

Orphaned accounts after departure

An account that stays active after its owner leaves can read channels, post messages and reach files long after the person has gone. Deactivation through LDAP sync or the System Console only works if every login path is covered by it, so a local email account or a second SSO path can keep working. Check each sign-in method against the offboarding process, and confirm which deactivation path applies to each group of users before you rely on it.

Bulk import files holding personal data

Bulk import files list names, email addresses and sometimes other profile fields, and they are often copied to laptops or shared drives during migration work. Store them in an encrypted location with access limited to the people running the import, and delete working copies once the load is verified. Ask the team who keeps each file, where backups of it exist, and when it is removed.

Broadly scoped API tokens

A personal access token or integration token inherits the permissions of the account that created it, so a token made by a system administrator can create users, change roles and deactivate accounts. Provisioning scripts should run under a dedicated service account with only the permissions the job needs, and tokens should have a named owner and an expiry date. Review which tokens exist and who created them before any automated provisioning goes live.

Shared or unowned system admin accounts

A shared administrator login makes it impossible to tell which person created, promoted or deactivated an account. Each system administrator should have a named account, and each admin account should have a documented owner who approves its existence and reviews it on a schedule. Remove admin rights from people who have changed roles, and confirm that at least two named administrators can perform account changes so one departure does not block offboarding.

Evidence of account changes

When an auditor or incident responder asks who created or deactivated an account, the answer must come from a record that is kept and trusted. Tickets that request and approve each account change, paired with the identity provider's own logs, give a second source to compare against. Before you commit to a retention period, confirm with Mattermost which audit and log records the server keeps and for how long, and set your own retention for the change records you control.

Questions buyers ask about Mattermost provisioning effort and cost

Can our own team handle Mattermost provisioning without a partner?

Yes, many teams with directory and Mattermost administration skills can run this in-house, and the decision depends on capacity and risk tolerance rather than on whether the work is possible. The work touches your identity provider, the Mattermost System Console, bulk import files and your leaver process, so the people doing it need administrator access to both sides. A partner is useful when no one on your team has run an identity integration end to end, when the directory has unusual structure, or when you want a fixed-scope delivery with written acceptance steps. Ask any partner to put the scope, deliverables and test cases in writing before work starts.

What makes Mattermost provisioning effort go up or down?

Effort rises with the number of identity sources, because each source needs its own login method, attribute rules and test cases. Custom attribute mapping adds work when usernames, email addresses or the unchanging ID attribute do not follow a clean pattern in your directory. Bulk import volume matters when you load historical users or migrate chat history, and the number of Slack or other migrations multiplies that work since each source needs its own transformation and validation. Ask for a quote that lists each identity source, each mapping rule, each import dataset and each migration as separate line items.

What do we need to provide before provisioning work starts?

You need to provide identity administrator access to the directory or identity provider, and an administrator account for the Mattermost System Console and command line tools. A directory test group is important so that test accounts can be created, changed and deactivated without touching production users. You also need a named owner who signs off on the leaver process, including how quickly access is removed, who is notified and how exceptions are handled. Confirm with your identity team which attributes are safe to use as stable identifiers before the first test import.

What recurring work follows a Mattermost provisioning launch?

After launch, someone needs to monitor directory sync results, including accounts that failed to update, accounts that were deactivated and any errors in the sync logs. Administrator accounts need periodic review, because role changes made in the identity provider or the console can leave people with more access than they need. Recurring work also includes checking the effect of identity provider changes, such as renamed groups or changed attribute names, and testing a leaver before each Mattermost upgrade. These tasks are small individually, but they stop being done when nobody owns them, so assign the owner before go-live.

Which Mattermost plan do we need for SSO and AD/LDAP sync?

According to the Mattermost pricing page, SSO through SAML, OIDC and OAuth and AD/LDAP user sync are included from the Professional plan. High availability clustering and FIPS 140-3 compliance are listed for the Enterprise plan, and air-gapped deployment is listed for Enterprise Advanced. Mattermost sells these plans as prepaid annual subscriptions based on seat licenses, and the pricing page lists no public prices and directs buyers to contact sales. Confirm the current plan terms directly with Mattermost before you commit, since plan contents can change between releases.

How should we request a quote for Mattermost provisioning work?

Request a fixed-scope quote based on a written scope that names each identity source, each attribute mapping rule, each bulk import or migration, the test accounts and the acceptance criteria for provisioning and deprovisioning. DeployOpen agrees scope, deliverables and timelines in writing before work starts, and a quote follows from that written scope rather than from a published price list. Ask the quote to separate one-time implementation work from any retainer for monitoring, upgrades and periodic review. Compare quotes on the written scope, not on headline totals.

Does DeployOpen issue compliance certificates for our provisioning controls?

No, DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies perform those assessments. The provisioning work can produce the evidence assessors usually ask for, such as documented joiner and leaver steps, sync logs and records of admin access reviews. Ask your assessor early which evidence they expect so the work is designed to produce it.

Limits and items to confirm in your environment

The items below decide how provisioning and deprovisioning will behave in your deployment. Each one depends on facts about your own Mattermost version, plan, high availability setup and identity provider, so confirm them before you choose an approach.

Release channel you run

Mattermost ships a new server version in binary form on the 16th of each month, and it also publishes Extended Support Releases. Mattermost v11.7 is an ESR released on 2026-05-15 with support ending 2027-05-15, while v11.11 (released 2026-09-16, support ending 2026-12-15) and v12.0 (released 2026-10-16, support ending 2027-01-15) follow the monthly cadence. Confirm which channel you are on, because sync and bulk import behavior you test today may change when you upgrade across monthly releases.

Server releases page

Plan that includes directory sync

AD/LDAP user sync is listed on the pricing page from the Professional plan upward, but the exact feature set and any seat or licensing terms depend on the plan you buy. Ask your Mattermost account contact to confirm in writing that the sync option, including scheduled deactivation of leavers, is included in your subscription. Mattermost sells prepaid annual subscriptions based on seat licenses, so also confirm how deactivated accounts count toward seats.

Pricing page

High availability and sync scheduling

High availability clustering is available only on the Enterprise and Enterprise Advanced plans, and it adds redundant application servers behind load balancers. Confirm with Mattermost documentation and your own test cluster whether running multiple nodes changes when the directory sync job runs, which node performs it, and how a failover during a sync affects deactivations. Do not assume single-node timing carries over to a cluster.

Identity provider deprovisioning options

Your identity provider controls whether a leaver is disabled there first, and Mattermost only sees the result on its next sign-in or sync. Check whether your provider offers automated user removal for the Mattermost application, whether it supports SCIM, and how long it takes to revoke sessions. A SAML login alone does not remove accounts, so the sync setting must match what your provider can actually send.

Bulk import format and mmctl commands

Bulk import uses a JSONL file, and the mmctl commands used to process it are version dependent. Mattermost's Slack migration guide shows the import flow with mmetl and mmctl, but field names, supported entries and command flags can change between releases. Run your import file and every mmctl command against a staging server on your exact version before you rely on them for a production load, and record the version alongside the file.

Migration docs

Stable identifier per authentication method

Confirm which attribute each authentication method uses as the stable user identifier, since this value decides whether a returning user maps to the existing account or creates a duplicate. Check that the identifier your identity provider sends does not change when a person's email, username or display name changes. Test a rename in your directory and verify that Mattermost links the existing account before you turn on automated provisioning.

How DeployOpen scopes and delivers Mattermost provisioning

DeployOpen plans, builds and documents Mattermost user provisioning and deprovisioning inside infrastructure you control. The work starts with a written scope that fixes how accounts are created, which identifier each auth method uses and how leavers lose access, then moves through build, testing and handover to your own team.

How we scope

  • Inventory the identity sources, auth methods and user populations that will create accounts in your Mattermost server.
  • Agree in writing which provisioning path applies to each group: first-login creation, bulk import or the REST API.
  • Record the stable identifier per auth method and the deactivation rule each leaver process must follow.

How we build

  • Configure the chosen auth method and AD/LDAP sync settings in a non-production Mattermost server first.
  • Build the pre-provisioning import or API scripts and run them against test users with dry runs before production use.
  • Test deactivation end to end, confirming that a disabled identity cannot sign in and that message history stays attached.

How we hand over

  • Deliver a provisioning runbook covering each path, its owner, its inputs and the order of operations.
  • Document the identifier mapping, sync filters and any scripts, with version control for custom code.
  • Walk your identity and platform teams through the runbook and the verification steps before sign-off.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after handover.
  • Retest provisioning and deprovisioning after Mattermost upgrades or changes to your identity provider.
  • Review scripts, sync settings and access results when your directory structure or leaver process changes.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.