Skip to main content

Team-level channel membership policies

Team Admins can create and manage attribute-based membership policies for public and private channels within their team, directly from Team Settings, without requiring System Admin involvement. For organization-wide policies managed by System Admins, see System-wide attribute-based access policies.

With team-level channel membership policies, Team Admins can:

  • Create policies that apply attribute-based access rules to one or more channels within their team.
  • Control which users can join or stay in private channels, and which users are recommended or automatically added to public channels, based on their profile attributes.
  • Manage auto-add for each channel, so channels stay up to date as user attributes change.

Use cases​

  • Team-wide project access: Restrict all private project channels to members with a specific project attribute.
  • Department isolation: Ensure only users from a specific department can join the team's private channels.
  • Clearance tiers: Apply clearance-level requirements consistently across multiple channels in the team without System Admin involvement for each change.
  • Onboarding recommendations: Recommend or automatically add users to the public channels that match their department or role.

Prerequisites​

  • Attribute-Based Access Control (ABAC) must be enabled by a System Admin in System Console > System Attributes > Attribute-Based Access.
  • You need Team Admin permissions for the team. The manage_team_access_rules permission is included in the Team Admin role by default.
  • Team-level membership policies can be assigned to public and private channels within the team. Default channels (such as Town Square and Off-Topic), shared channels, and group-synced channels can't be assigned.

Access Team Settings​

  1. Select the team name in the sidebar to open the team menu.
  2. Select Team Settings.
  3. Navigate to the Channel Membership tab (the fourth tab in Team Settings). This tab is only visible when ABAC is enabled system-wide and you have Team Admin permissions.

Public and private channels​

A policy behaves differently depending on the type of each channel it's assigned to:

  • Private channels are enforced. Only users who match the rules can join or be added, and members who no longer match are removed during synchronization.
  • Public channels are advisory. Nobody is ever removed and anyone can still join. Matching users are added automatically when auto-add is on, or see the channel under Browse Channels > Recommended channels when it's off.

A single policy can cover both kinds of channel. The editor shows a warning when it does, and each channel follows the rules for its own type.

Manage membership policies​

The Channel Membership tab shows policies scoped to the team. Each policy displays its name and the number of channels it applies to.

If a policy applies to at least one private channel, Team Admins only see it when their own user attributes satisfy its rules. For example, if a policy requires Department=Engineering and the Team Admin has Department=Finance, that policy won't appear in their list. This self-inclusion safety mechanism prevents admins from being locked out of channels they manage. Policies that apply only to public channels are always shown, because they can't remove anyone.

Create a policy​

  1. In the Channel Membership tab, select Add policy.
  2. Enter a unique policy name.
  3. Define rules under Membership rules:
    • Select Add attribute to add a condition.
    • For each condition, choose the user attribute, a matching operator, and the required value. The operators on offer depend on the attribute's type. See Operators by attribute type for the full list. This editor uses Simple Mode only.
    • Add multiple conditions as needed. All conditions are combined with a logical AND, so users must satisfy all of them.
  4. Assign channels under Assigned channels:
    • Select Add channels to search for and select public or private channels within the team.
    • Channels already assigned to this policy are excluded from the search results to prevent duplicates.
    • A channel can be assigned to multiple policies simultaneously; all policies are enforced independently.
  5. Optionally, toggle Auto-add members per channel to control whether users matching the rules are automatically added to that channel.
  6. Select Save to apply the policy.

Edit a policy​

Select a policy row in the list, or use the three-dot menu and select Edit, to open the policy editor. You can update the policy name, access rules, and channel assignments. Select Save to apply changes.

When saving changes that affect channel membership, a confirmation dialog summarizes how the policy will affect its assigned public and private channels. Confirm to proceed.

Delete a policy​

You can only delete a policy that has no channels assigned to it. To delete a policy:

  1. Open the policy editor and remove all assigned channels using the Remove link next to each channel.
  2. Once all channels are removed, select Delete policy at the bottom of the editor.
  3. Confirm the deletion.

Auto-add members​

Each channel assigned to a policy has its own Auto-add members toggle:

  • Enabled: Users matching the policy rules are automatically added to the channel during synchronization. On a private channel, a user who loses the required attributes is removed, and is added again if they later regain them. On a public channel, a matching user who leaves is added again at the next synchronization.
  • Disabled (default): Nobody is added automatically. On a private channel, the rules still act as a gate. On a public channel, matching users see the channel as recommended.

On private channels, users who no longer satisfy the access rules are always removed during the next synchronization, whatever this setting is. On public channels, nobody is ever removed.

Policy inheritance and combination​

When both a system-wide policy and a team-level policy apply to the same channel, both must be satisfied. Team-level policies are additive and cannot relax or override restrictions set by System Admins.

  • System-wide policies are managed in the System Console.
  • Team-level policies are managed in Team Settings.
  • Users must meet the rules of all applicable policies to access the channel. If any policy denies a user, that user is denied. See How rules combine.

Cross-team policies​

A policy that has channels from more than one team is considered a cross-team policy. Cross-team policies are not visible in any team's Channel Membership tab — they are managed exclusively through the System Console.

If a System Admin adds a channel from another team to a policy that was previously scoped to one team, that policy will no longer appear in any team's Channel Membership tab.

Synchronization​

When you save a policy, change its rules or channel assignments, or change auto-add for a channel, Mattermost creates a membership synchronization job for the team. Changes are applied as soon as the job completes, so you don't need to trigger a sync yourself.

The bottom of the Channel Membership tab shows when the team's policies were last synchronized. Select Sync now to run a synchronization immediately. It only affects channels and policies in the current team.

Synchronization also runs automatically 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.

Troubleshooting and FAQs​

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

The Channel Membership tab is only visible when:

  • You have Team Admin permissions.
  • ABAC is enabled system-wide by a System Admin in System Console > System Attributes > Attribute-Based Access.

Why can't I see a policy that I know exists?​

There are two reasons a policy may not appear in your Channel Membership tab:

  • Cross-team policy: The policy includes channels from more than one team. Cross-team policies are not visible in Team Settings for anyone and must be managed through the System Console.
  • Self-inclusion filter: The policy applies to at least one private channel, and your own user attributes do not satisfy its access rules. For example, if a policy requires Department=Engineering and your profile has Department=Finance, you will not see that policy. A System Admin or another Team Admin whose attributes do satisfy the rules would need to manage it instead.

What happens when I save rules that would exclude me?​

If the policy applies to at least one private channel, Mattermost validates your access rules against your own user attributes before saving. If the rules would exclude you, the save is blocked and an error is shown. Adjust the rules to include your own attributes, or reset them using the Undo option in the save panel.

Can I assign a channel to more than one team-level policy?​

Yes. A channel can be assigned to multiple membership policies. Each policy's rules are applied independently, and users must satisfy all of them.

Can Team Admins override system-wide policies?​

No. Team-level policies are always additive. Users must satisfy both the system-wide policy and the team-level policy to access a channel. Team Admins cannot weaken or bypass restrictions set by System Admins.

Do team-level policies apply to bot accounts?​

Yes. Bot accounts are evaluated against team-level channel membership policies exactly like members. A bot that doesn't have the attribute values a policy requires can't be added to the policy's private channels and is removed during synchronization. Set the bot's attributes before adding it to those channels. See Bot attributes.

How are membership changes communicated to users?​

Users receive standard Mattermost notifications when they are removed from or added to channels due to policy changes, consistent with other membership change notifications.