Mattermost AD/LDAP group synchronization

Mattermost AD/LDAP group synchronization drives team and private channel membership and roles from directory groups, including nested groups, so onboarding and offboarding follow Active Directory or LDAP.

On this page

How Mattermost AD/LDAP group sync keeps team and channel membership aligned with the directory

If joiners, movers and leavers still reach Mattermost through manual admin changes, access drifts from the directory the moment someone changes roles. The point of AD/LDAP group synchronization is to let directory group membership drive Mattermost access instead. According to the Mattermost AD/LDAP groups documentation, the feature creates Mattermost groups by synchronizing with directory groups, maps those groups to Mattermost roles, supports nested groups, and manages team and private channel membership from the synced groups. Adding someone to a directory group then grants access, and removing them revokes it, without an administrator editing team or channel membership by hand.

The feature is tied to plan level, so confirm it before designing around it. The Mattermost docs list AD/LDAP groups as available on the Entry, Enterprise and Enterprise Advanced plans but not on Professional. That is a different boundary from AD/LDAP user sync, which the Mattermost pricing page lists from the Professional plan. An organization on Professional can sync users but cannot use group-driven team and channel membership, so the plan decision has to come before the directory design. Ask your Mattermost account contact to confirm the current plan entitlements in writing, since plan contents can change.

Before enabling anything, the first decision is which directory groups should own which Mattermost teams and private channels, and who owns each group in Active Directory or LDAP. Nested groups make this easier if your directory already models departments or projects, but they also mean a change in a parent group can change Mattermost membership in ways the team did not intend. Review the group structure with the directory owners, then test the mappings in a non-production Mattermost server with a small set of test accounts, confirming that a removal from a directory group removes the expected team and channel membership on the next sync.

Which group sync approach fits your directory and plan

This table compares the main ways to map directory groups onto Mattermost, from team membership to private channels and system roles, and notes where nested groups and plan levels change the answer. Read each row against your directory structure and license tier, then confirm the exact behavior in the AD/LDAP groups documentation for your running server version.

Sync targetWhat it controlsBest fitConfirm before choosing
Teams onlyTeam membership for users in a mapped directory groupDepartments or business units that map cleanly to one team eachHow removals from the group are handled and whether team roles can be set
Private channelsPrivate channel membership for mapped directory groupsProject or incident groups that need restricted access to specific channelsChannel count growth and how membership changes propagate on sync
System rolesMattermost system-level roles assigned from directory groupsSmall set of administrative or platform roles tied to a directory groupWhich roles can be mapped and whether role changes take effect at next sync
Nested groupsMembership through groups that contain other groupsOrganizations where access follows a layered group hierarchyWhether nested membership is resolved in your directory and the sync depth supported
Flat groups onlyMembership from direct group members with no nestingDirectories with simple, single-level group designWhether your directory uses nested membership that would be missed
Plan requirementAvailability of AD/LDAP group sync on your licenseEntry, Enterprise and Enterprise Advanced plansNot available on Professional, so confirm your plan before design work

Setting up AD/LDAP group sync in order

This sequence takes you from confirming that your plan and directory connection support group sync to a documented rollout in which team and private channel membership and roles follow directory groups. Each step ends with a check you can run before moving on.

  1. Confirm plan and directory connection

    Confirm with Mattermost that your plan includes AD/LDAP groups. The supplied facts list them on Entry, Enterprise and Enterprise Advanced, but not Professional, so check your current subscription before any build work. Then confirm that the AD/LDAP connection and user sync already work, because group sync depends on directory users being present in Mattermost. Check this by signing in with a directory test account and confirming that its profile matches the directory entry. Record the bind account, search base and user filter so later steps can reuse them.

  2. Define the group naming and ownership model

    Before creating any mapping, agree with the directory owners how groups will be named, who creates and approves them, and which groups map to Mattermost teams, private channels or roles. Use a naming pattern that makes purpose obvious, such as a prefix for the platform and a suffix for the team or channel. Document which group owner can add members, because membership in the directory becomes membership in Mattermost. Check this step by reviewing a sample of groups with the directory owners and confirming each one has a single documented purpose and an owner.

  3. Create the group sync mappings

    In the System Console, locate the AD/LDAP group settings and create groups by synchronizing with the directory groups you approved. Map each directory group to the Mattermost team or private channel it should control, and map roles where your model requires them. Include nested groups only where the directory hierarchy is intended to grant access, since nesting can widen membership in ways that are easy to miss. Check this step by confirming that each mapping appears in the group list with the expected source, and that no unexpected directory groups were imported.

  4. Run a pilot with a small group

    Choose one directory group with a few known members and a single team or private channel as the target. Run the sync and watch what changes in Mattermost. Use an account that is not in the pilot group as a control, and confirm it does not gain access. Pilot membership should be small enough that you can check every user by hand. Check this step by comparing the directory membership list with the Mattermost team and channel membership, and by reviewing the sync logs for errors on any user.

  5. Verify membership and roles

    Test the behavior that matters most before broader rollout. Add a test user to the pilot directory group and confirm the user joins the mapped team or channel. Remove the user and confirm the membership is removed on the next sync. Check any mapped role, and confirm that a user who is disabled in the directory loses access according to your settings. Record the sync interval and any delay you observe, and confirm it with Mattermost documentation rather than assuming a value. Do not expand scope until these join, leave and role checks pass.

  6. Roll out in stages and document

    Add mappings in groups, starting with the lowest-risk teams and channels, and repeat the membership checks for each stage. Keep a register that lists each directory group, its owner, the Mattermost target, any roles and the date it went live. Write a short runbook covering how to add a group, how to review membership, how to troubleshoot a sync that does not match the directory, and who to contact. Check this step by having a second administrator follow the runbook to create a test mapping in a non-production environment.

Directory models that change how sync behaves

A single Active Directory domain with one set of user and group containers is the simplest starting point for Mattermost group sync. Group membership is read from one directory tree, the group objects follow standard Active Directory conventions, and one set of search bases and filters usually covers every team and channel you plan to drive from groups. Most of the effort goes into agreeing which groups become teams, which become private channels and which map to Mattermost roles, not into the directory connection itself.

  • Group scope and type: Confirm which security groups are in scope and whether any are universal, global or domain local, since your filters must match the groups you intend to use.
  • Nested membership: Confirm that the nested groups you rely on are resolved for membership, and test a user who inherits access through two or three levels of nesting.
  • Group naming: Agree a naming convention so group names map predictably to team and channel names and do not collide during onboarding.
  • Ownership of groups: Identify who creates and removes groups in the directory, because that person effectively controls Mattermost membership.
  • Attribute stability: Confirm which attribute uniquely identifies each group, so renames in the directory do not orphan Mattermost teams.

Before go-live, confirm with your directory team that the groups you plan to sync are stable and documented, and check the current Mattermost AD/LDAP groups documentation for the exact filter and attribute settings your version expects.

Security and access risks of directory-driven membership

Directory-driven membership moves access decisions out of Mattermost and into Active Directory or LDAP, so the security of the directory becomes the security of your channels. The cards below cover the places where that handoff tends to fail and the control to apply at each one.

Over-broad groups grant channel access

A directory group that was created for email distribution or a broad department can map straight onto a team or private channel. Before you link a group, list its members and nested members and confirm that each one should read the channel. Keep one group per channel purpose, and avoid linking groups that contain everyone in a division, contractors or former staff. Review the team and channel mappings after each group-to-channel change.

Groups are expanded
Nested
AD/LDAP groups docs

Delayed removal after a user leaves

Access ends only when the directory stops reflecting the person's membership. If HR offboarding disables the account but group membership is cleaned up later, or if the group sync interval leaves a gap, a departed user can keep channel access for longer than intended. Confirm how often the sync runs in your configuration, and test by removing a test account from a group and checking that its Mattermost team and channel memberships and sessions change as expected.

Service accounts with LDAP bind rights

The Mattermost server binds to the directory with a service account to read users and groups. That account should have read access to the search base and group attributes only, with no write rights and no membership in privileged groups. Store its password in your secrets management system rather than in shared configuration files, rotate it on a set schedule, and confirm that its bind permissions are limited to the directory scope Mattermost needs.

Membership changed by non-admins in the directory

Any person or helpdesk role that can edit a synced group in Active Directory can change who reaches a Mattermost channel, even if they have no Mattermost admin rights. Review who holds write permissions on the groups you map, and separate groups that control chat access into an admin-owned organizational unit. Treat changes to these groups with the same review you apply to changes to other access groups.

Audit trail for membership changes

When a channel membership changes, you need to know whether the change came from a directory group update, a manual change in the System Console, or a user action. Confirm which events Mattermost records for group sync and role changes, and forward those logs to your central logging system. Also keep directory change logs for group edits, so you can match a Mattermost membership change to the directory change that caused it.

Role mapping that escalates privileges

Mapping a directory group to a Mattermost role or admin-level permission can grant more than a channel membership. Before you map any group to a role, check which permissions that role carries in your permission scheme and confirm that no group that feeds an admin role contains users who should not have it. Document each mapping and review the list whenever your permission schemes change.

How a directory change reaches Mattermost membership

The path starts in the directory, where a user joins a child group nested inside a parent group. The Mattermost sync job queries the directory and resolves the parent group's membership, including members inherited through nesting. Each synced group maps to team membership and private channel membership, so access follows the directory without manual changes. The trust boundary sits between the directory and the Mattermost server. Check that the sync account can read nested group objects, and confirm that a user removed from the group loses team and channel membership in a later sync.

A nested directory group drives Mattermost team and channel membership through the sync job.

Limits to confirm in your environment before you commit

AD/LDAP group synchronization depends on plan level, directory structure and release line, and several of those details are not fully documented in the sources available here. The cards below list what to confirm with Mattermost and test in a staging deployment before you commit to a design.

Plan entitlement for group sync

The topic documentation places AD/LDAP groups on the Entry, Enterprise and Enterprise Advanced plans and not on Professional. Confirm this against the current pricing and plan documentation before you buy, because a Professional subscription would leave group-driven membership unavailable. Ask your Mattermost account contact to confirm the entitlement in writing for the exact tier you are quoting.

Mattermost pricing

Nested group depth and behavior

Nested groups are supported, but the maximum nesting depth and how inherited membership resolves when a user belongs to several parent groups are details to verify. Build a test directory with the nesting pattern your organization actually uses, including cycles and users in multiple branches. Record what Mattermost adds, keeps or removes at each level.

Sync frequency and removal handling

Confirm how often group membership is refreshed and what happens when a user is removed from a directory group. Test whether removal takes effect from team and private channel membership and whether it also changes roles. Offboarding depends on this behavior, so measure the delay from a directory change to the effective Mattermost change in your environment.

Group count and directory load

The number of directory groups that can be mapped, and how that affects sync time and the LDAP query load on your domain controllers, are not stated in the sources reviewed here. Ask Mattermost for documented limits and run a sync against a realistic group count before go-live. Coordinate with your directory team on query volume and service account permissions.

Interaction with SSO and attribute sync

Group sync, SSO and user attribute sync share the same directory identity, so a change in one can affect the others. Confirm the order in which accounts are created, how group membership applies to users who first sign in through SAML or OIDC, and whether attribute values used for access decisions update at the same time as group membership.

Version behavior across releases and ESRs

Mattermost ships a new server version in binary form on the 16th of each month, and Extended Support Releases follow a longer support window. Confirm in the release notes for your target line that group sync behavior, admin settings and API endpoints have not changed, and retest group mappings after each upgrade. Keep a written test script so each upgrade can be checked against the same cases.

Server releases page

Questions teams ask before syncing Mattermost groups from LDAP

Does Mattermost Professional include AD/LDAP group sync?

No. AD/LDAP groups are available on the Entry, Enterprise and Enterprise Advanced plans but not on Professional, according to the Mattermost AD/LDAP groups documentation. Professional does include AD/LDAP user sync, so you can provision accounts from the directory but still manage team and channel membership by hand. Confirm your plan entitlement with Mattermost sales before you scope the work, because the feature matrix decides whether the project starts with a licensing change.

What drives the cost of an AD/LDAP group sync project?

The cost follows the number of directory groups, the nesting depth, and how many Mattermost teams and private channels the groups must map to. Other cost drivers are the number of distinct role rules, the state of the directory (clean group naming and ownership versus years of ad hoc groups), and whether your LDAP or Active Directory service account and filters need changes. Mattermost licensing is a separate recurring cost paid to Mattermost, while implementation labor is a one-time cost. When you request a quote, ask for the scope as a written list of groups, mappings and environments, plus the testing and cutover steps included.

How long does a pilot of Mattermost group sync usually take?

A pilot length depends on the size of the directory groups in scope, how many teams and channels they feed, and how quickly the directory and Mattermost owners can agree on group ownership. A narrow pilot covering one team and a few groups is generally much shorter than a multi-team rollout with nested groups. No fixed duration applies to every organization, so ask any provider for a timeline tied to the written scope and the approval points, such as sign-off from the directory team and a test account review. Your own environment, including change windows and access approvals, will set the calendar.

What do the directory team and Mattermost admins need to provide?

The directory team needs to supply the group structure, a bind account with read access to the relevant base distinguished names, and confirmation of how nested membership should be resolved. Mattermost admins need to define which groups map to which teams, private channels and roles, and who approves changes. Both teams should agree on a group naming standard and an owner for each group, because sync can only follow the directory's membership data. Ask for a list of these inputs before the work starts so the pilot does not stall waiting for access.

Can our internal team set up Mattermost group sync without a partner?

Yes, if your team has administrators who know both the System Console and your directory schema well enough to test membership changes safely. The configuration itself is administrative, but the risk sits in mappings: a wrong group link can add or remove many users from channels at once. Internal teams usually need time to build a test directory group, verify nested membership, and document a rollback. Decide early whether the work fits existing capacity, and if it does not, a fixed-scope engagement can cover the design, build and handover.

Why do nested groups cause the most trouble in sync?

Nested groups are harder because membership is inherited through other groups, so a user can be added to a channel through a path nobody expected. Sync must resolve every level of nesting for each user, and deep or circular nesting makes results harder to predict and audit. Test with a few known accounts at each depth, confirm that removing someone from a parent group removes their access as expected, and record which groups are intentionally nested. Flatten groups where that is simpler, but only after confirming the business rules they encode.

What changes for users and admins after go-live?

Onboarding and offboarding follow directory changes, so a user who joins a group gets the matching team and channel access without an admin ticket, and removal from the group removes that access. Admins shift from editing memberships by hand to managing the directory groups and the mappings between them. Expect a review routine: check sync logs after directory changes, review groups that feed privileged roles, and recheck mappings after Mattermost upgrades. Ask the provider who handles these routines after handover and whether support is covered by a retainer.

How DeployOpen scopes and delivers Mattermost group sync

DeployOpen plans, builds, tests and documents Mattermost AD/LDAP group synchronization inside the client's own infrastructure. Engagements are fixed-scope, with the directory mapping, team and channel rules and verification agreed in writing before any configuration changes are made.

How we scope

  • Inventory the AD or LDAP groups that should map to Mattermost teams, private channels and roles.
  • Confirm the Mattermost plan level, since AD/LDAP groups are not included on Professional.
  • Agree in writing how nested groups, group ownership and offboarding removals will behave.
  • Confirm which admin accounts, service bind credentials and directory locations the work will touch.

How we build

  • Configure group sync in the System Console and map each directory group to the agreed team or channel.
  • Test nested group resolution and role assignment with a small set of illustrative test accounts first.
  • Verify that adding or removing a user in the directory changes Mattermost membership as designed.
  • Review the bind account permissions and directory query scope against the least-access model agreed.

How we hand over

  • Deliver a written mapping of directory groups to teams, channels and roles, with the reasons for each.
  • Document the onboarding and offboarding flow so administrators can check it without DeployOpen.
  • Provide test evidence from the verification runs, including the cases that failed and their fixes.
  • Walk the client's identity and Mattermost administrators through the runbook before closing the engagement.

How we support

  • Plan a re-test after directory restructures, new groups or Mattermost upgrades that touch sync behavior.
  • Offer ongoing support, upgrades and continuous testing as a retainer if the client prefers it.
  • Ask for a quote that lists directory scope, number of groups, test cases and handover items separately.
  • Confirm with the directory team how group changes will be reviewed before they reach Mattermost.

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.