Skip to main content

Channel-specific access rules

Channel and Team Admins can self-manage access controls for their channels directly through the Channel Settings modal, without requiring System Admin intervention. For organization-wide policies created by System Admins, see System-wide attribute-based access policies. For team-scoped policies that apply rules across multiple channels within a team, see Team-level channel membership policies.

From Mattermost v11.8, channel access rules can be applied to both private and public channels. The two channel types behave differently under ABAC:

  • Private channels are hard-gated. Non-matching members are removed during synchronization, and only matching users can be added or invited.
  • Public channels are advisory. Non-matching members are never removed (anyone can still join a public channel by browsing or via a direct link). With auto-add enabled the policy still pulls matching users in; with auto-add disabled the channel surfaces under Browse Channels > Recommended channels for users whose attributes match.

Each channel also has its own auto-add setting, which controls whether Mattermost adds users who match the rules but aren't members yet. On private channels, members who no longer match the rules are removed whether auto-add is on or off. On public channels, ABAC never removes anyone; the rules are advisory only.

With channel access rules, Channel and Team Admins can:

  • Create channel-specific access rules using a simple interface.
  • Use rules that are additive to any system policies. For private channels, both must be satisfied for adds and invites. For public channels, the combined rules affect auto-add and recommendations only, and don't block joins or remove members.
  • Automatic member synchronization with immediate feedback.
  • Self-exclusion prevention to avoid locking yourself out (private channels only).

Prerequisites​

  • Attribute-Based Access Control (ABAC) must be enabled by a System Admin in System Console > System Attributes > Attribute-Based Access.
  • You need Channel Admin permissions and the manage_channel_access_rules permission.
  • Channel access rules are available for private and public channels, with behavior that varies by channel type. See Public and private channel behavior. Default channels (such as Town Square and Off-Topic), shared channels, and group-synced channels remain ineligible.

Access Channel Settings​

  1. In a private or public channel where you have Channel Admin permissions, select the channel name at the top of the center pane.
  2. Select Channel Settings from the dropdown menu.
  3. Navigate to the Membership Policy tab. This tab is only visible for eligible channels when you have the appropriate permissions and ABAC is enabled system-wide. The tab is hidden on default channels, shared channels, and group-synced channels.

Configure access rules​

Channel access rules use Simple Mode, the same table editor that system policies use, so you can build attribute-based conditions without writing expressions. Advanced Mode isn't available in Channel Settings.

  1. In the Membership Policy tab, you'll see any inherited system policies at the top in a blue information banner (if applicable).
  2. Use the Add attribute button to create new access conditions:
    • Select attribute: Choose from available user attributes
    • Choose operator: Select how the attribute should match. The operators on offer depend on the attribute's type. See Operators by attribute type for the full list.
    • Set values: Enter the required attribute values
  3. Add multiple conditions as needed. All conditions are combined with logical AND (all must be satisfied).
  4. Select Test access rule to preview which users would be granted access based on your current rules.
  5. Select Save at the bottom of the tab to apply your changes.

Auto-add members​

The Auto-add members based on access rules checkbox controls automatic membership management. The behavior differs by channel type:

  • Private channels (hard gate): Membership stays consistently aligned with the rules, similar to how LDAP group channels work.
    • Enabled: Users matching the rules are automatically added. If users temporarily lose attributes and later regain them, they will be automatically re-added.
    • Disabled: Rules act as a gate (preventing unauthorized joins) but don't automatically add qualifying users.
  • Public channels (advisory): ABAC never removes members — anyone can still join a public channel.
    • Enabled: Matching users are automatically added (a convenience, not a gate). A matching user who leaves the channel is added again at the next synchronization. To let users leave for good, turn auto-add off.
    • Disabled: The channel appears under Browse Channels > Recommended channels for users whose attributes match, surfacing the channel without adding anyone.

Validation and safety​

Before saving changes, Mattermost validates your rules to prevent common issues:

  • Required fields: All attribute selections and values must be completed.
  • Self-exclusion prevention: For private channels, you cannot save rules that would remove yourself from the channel. The check is skipped for public channels because they are advisory under ABAC and can't lock anyone out.
  • Conflict detection: Rules that create impossible conditions are identified.

When you save changes that affect membership, a confirmation dialog shows you:

  • How many users will be added or removed.
  • Option to view the specific users affected.
  • Confirmation required before applying changes.

Once a policy is attached to a channel, the channel cannot be converted between public and private until the policy is removed. The two modes have different semantics (advisory vs. hard gate), so a silent conversion would change what an existing policy actually does to its members.

Public and private channel behavior​

Membership policies behave differently depending on the type of channel they're applied to:

  • Private channels: Membership policies are enforced. Users who match the policy's rules are added, and users who don't match the rules are removed during synchronization.
  • Public channels: Membership policies are advisory. Matching users may be automatically added when auto-add is enabled, but non-matching members are not removed.
  • When auto-add is disabled for a public channel, matching channels are surfaced as recommended rather than enforcing membership.
  • Direct messages and group messages aren't eligible for membership policies.
  • Default channels such as Town Square and Off-Topic are excluded.

Channel-level permission policies​

From Mattermost v11.8, channel admins can define channel-level permission rules that restrict actions, such as uploading or downloading files, based on user attributes and channel role. Each rule applies to one role: Channel admin, Channel member, or Channel guest.

For system-wide permission policies that restrict these actions, see Permission policies.

After adding or editing a rule in the Permissions Policy tab, select Save at the bottom of the tab to apply it.

From Mattermost v12, permission rules can also use any session attributes a System Admin has enabled, letting you restrict file actions by device or network rather than by who the user is.

Simulate access​

From Mattermost v11.8, admins can preview whether selected users can perform actions such as uploading files or downloading files before saving policy changes. In the Permissions Policy tab, select Simulate rules to open Simulate access.

  • Simulation can evaluate draft rules before they're saved, so you can confirm the intended scope without affecting live channel access.
  • Simulation covers permission rules only. To preview who a membership rule lets into the channel, use Test access rule in the Membership Policy tab.
  • Some denied results may indicate that the decision came from another policy. In that case, Mattermost shows that access was denied by another policy without exposing policy details you aren't authorized to see.
  • From Mattermost v12, a neutral No recent session result indicates that the rules reference session attributes and the selected user has no cached session data to evaluate.

Manage team-scoped membership policies in Team Settings​

Team Admins can also create membership policies that cover several public or private channels in their team at once, from the Channel Membership tab in Team Settings. See Team-level channel membership policies for details.

Policy inheritance​

A channel can have its own access rules and can also import one or more system policies. When both are configured:

  1. System policies are displayed in a blue banner at the top (read-only).
  2. Channel rules are managed in the access rules section below.
  3. Every policy must allow access. Users must satisfy each system policy and the channel's own rules. If any one of them denies a user, that user is denied. See How rules combine.
  4. Channel rules add restrictions. They can't weaken or override a system policy.
  5. Auto-add isn't inherited. Each channel keeps its own auto-add setting. When a System Admin assigns a system policy to a channel that has no access rules of its own yet, the system policy's setting becomes the channel's starting value. After that, only the channel's setting counts, and changing the system policy doesn't change it.

Use cases and recommendations​

Ideal use cases for channel access rules:

  • Project-specific channels: Restrict access to team members working on specific projects
  • Clearance-based discussions: Ensure only users with appropriate security clearance can participate
  • Department communications: Limit channel access to specific organizational units
  • Temporary access: Create rules for short-term project teams or contractor access

Best practices:

  • Start simple: Begin with basic attribute conditions before adding complexity
  • Test before saving: Always use Test access rule to verify your intended scope
  • Document changes: Consider posting a message in the channel when access rules change
  • Regular review: Periodically review rules to ensure they remain appropriate
  • Coordinate with IT: Work with System Admins for complex organizational policies

When to use system policies vs. channel rules:

  • System policies: Use for organization-wide standards, compliance requirements, or policies affecting multiple channels
  • Channel rules: Use for channel-specific restrictions, project-based access, or when you need immediate control without IT involvement

End-user experience​

When channels have attribute-based access controls applied, users will see clear indicators and experience specific behaviors designed to maintain security while providing transparency.

Visual indicators​

Channel Members panel:

  • Information banner at the top explains that attribute-based access is enabled. The message differs by channel type: private channels indicate that access is restricted by user attributes, while public channels indicate that member recommendations are based on user attributes.
  • Displays required attribute values as tags (e.g., "Engineering", "Confidential").
  • Tooltip on hover shows the attribute name for each value.

Add Members modal:

  • Similar information banner and attribute value display.
  • On private channels, users who don't match the access criteria won't appear in search results — only eligible users can be added.
  • On public channels, the full team list is shown and matching users are surfaced with a Recommended tag at the top of the list. Anyone can still be added because public-channel ABAC is advisory.

Browse Channels:

  • A Recommended channels filter is available in the channel-type dropdown when ABAC is enabled. Selecting it lists the public channels whose policies the user matches — useful when auto-add is disabled and the channel is offered as a recommendation rather than auto-joined.

Functional restrictions​

When ABAC is enabled for a private channel:

  • Search limitations: Users who don't match access criteria don't appear in member search results.
  • Invitation restrictions: Only users meeting attribute requirements can be added to the channel.
  • Guest user exclusions: Private channels with ABAC policies cannot have guest users invited.
  • Automatic removal: Users who lose required attributes are automatically removed during the next synchronization.

When ABAC is enabled for a public channel:

  • Search results are unfiltered: All eligible team members appear in the Add Members modal so admins can still invite anyone; matching users carry a Recommended tag.
  • Recommendations: With auto-add disabled, the channel surfaces under Browse Channels > Recommended channels for matching users.
  • Auto-add (when enabled): Matching users are added automatically. Members are never removed by ABAC, and joining freely is unaffected because the channel is public. Users can leave, but a user who still matches the rules is added again at the next synchronization.

Troubleshooting and FAQs​

Common questions about attribute-based access control implementation and usage.

Permission and access​

Why can't I see the Membership Policy tab in Channel Settings?​

The Membership Policy tab is only visible when all of these conditions are met:

  • You have Channel Admin role or higher for the channel.
  • The channel is a private or public channel (not a default channel like Town Square or Off-Topic, group message, direct message, shared, or group-synced channel).
  • ABAC is enabled system-wide by a System Admin in System Console > System Attributes > Attribute-Based Access.
  • Your user role includes the manage_channel_access_rules permission.

Can Channel and Team Admins override system policies?​

No. Channel rules are always additive to system policies. Users must satisfy both system policies AND channel rules to access the channel. Channel and Team Admins cannot weaken or override restrictions set by System Admins.

What happens if I create rules that would exclude myself?​

For private channels, Mattermost prevents this with self-exclusion validation. If your rules would remove you from the channel, you'll see an error message and cannot save the changes until you adjust the rules or reset them.

For public channels, the self-exclusion check is skipped — public-channel ABAC is advisory, the policy can't kick anyone out, and you can always re-join a public channel directly. This lets you author a policy intended for a different team (for example, a Sales admin configuring an Engineering recommendation) without being blocked.

Can I convert a public channel to private (or vice versa) while a policy is attached?​

No. The two modes have different semantics — a public-channel policy is advisory while a private-channel policy is a hard gate that removes non-matching members. A silent conversion would change what the existing policy does to its members, so Mattermost requires you to remove the policy first, convert the channel, and re-attach the policy if you still want it.

Rule configuration​

Can I use advanced CEL expressions in Channel Settings?​

No. Channel Settings only supports Simple Mode with simple attribute conditions. For complex expressions with nested logic or mixed operators, System Admins need to create policies in the System Console.

How do I remove all access rules from a channel?​

Delete all attribute conditions from the access rules table. When no rules are configured and no system policies are applied, the channel returns to standard access behavior.

Why can't I select the auto-add checkbox?​

The Auto-add members based on access rules checkbox is unavailable while the channel has no access rules of its own and no system policy applies to it. Add at least one access rule, and the checkbox becomes available.

Synchronization and membership​

How quickly are membership changes applied?​

When you save access rules, a membership sync job is created and changes are applied as soon as the job is completed. Mattermost also runs synchronization on a schedule, every 60 minutes by default, to handle attribute changes from external systems such as AD/LDAP or SAML. See Sync job interval. Synchronization always reads the latest attribute values. Other lookups, such as the people offered when adding members and the results of testing a rule, can take up to 30 seconds by default to reflect an attribute change. See Attribute refresh interval.

Will users be notified when they're removed from a channel?​

Yes, users receive standard Mattermost notifications when they're removed from channels due to access rule changes, similar to manual removals.

Can I see who was added or removed during synchronization?​

Yes, the confirmation modal before saving shows exactly which users will be affected. System Admins can also view detailed synchronization logs in the System Console.

Attribute and data questions​

Which user attributes can I use in access rules?​

You can use any user attributes either synchronized via LDAP/SAML or manually configured by System Admins in System Console > System Attributes > Attribute Management (User Attributes before Mattermost v12.0).

What happens if a user attribute changes?​

During the next scheduled synchronization (every 60 minutes by default), users who now match the access rules are added if auto-add is on. On private channels, users who no longer match are removed. On public channels, nobody is removed.

Do guest users work with ABAC channels?​

No. Private channels with attribute-based access control cannot have guest users. This ensures strict adherence to access control policies based on organizational attributes.

Do bot accounts work with ABAC channels?​

Yes. Bot accounts are evaluated against channel access rules exactly like members. A bot that doesn't have the attribute values the rules require can't be added to a private channel and is removed during synchronization, and on public channels it's only auto-added when it qualifies. Set the bot's attributes before adding it to the channel. See Bot attributes.

Can group-sync channels use ABAC?​

No. Channels configured with group synchronization cannot use attribute-based access control. Group-sync and ABAC are mutually exclusive features - you must choose one method of access control per channel.