How SAML attributes set Mattermost admin and guest roles
Mattermost can read admin and guest attributes from SAML assertions at sign-in, so role changes made in your identity provider reach Mattermost the next time a user authenticates, without manual work in the System Console. This fits organizations where joiner, mover and leaver processes already live in the IdP, and where the IdP team owns who is an administrator or a guest. It fits less well where role decisions are made by the Mattermost team, or where the IdP cannot express those roles as clean, maintained attribute values.
Before you build anything, confirm the exact attribute names and accepted values in the current Mattermost SAML single sign-on documentation and in your own IdP. Attribute names and value formats are the most common source of silent mismatches, so test with a pilot group and a known account. Check what each value maps to before you release the attribute to all users, and agree who owns the attribute mapping in the IdP so that a rename there does not quietly remove admin rights.
Plan for the one-way behavior of guest status. A guest attribute can move a user into the guest role, but the mapping does not promote a guest back to a full member, so a guest who should regain access may need a manual change or a deliberate account process. Also confirm how SAML-driven roles interact with directory sync and with any administrator changes made in the System Console, since those paths can overwrite each other. Write down which system is the source of truth for each role before go-live.
Which role source fits each group of users
This table compares the four ways Mattermost roles can be set: SAML attributes, the System Console, the AD/LDAP admin filter and guest status. Read each row for what the option governs, who maintains it and the user group it suits. The main takeaway is that the AD/LDAP admin filter does not act on SAML-only users, so SAML-based roles need their own attribute mapping.
| Role source | What it governs | Who maintains it | When it fits |
|---|---|---|---|
| SAML attribute mapping | System admin and guest roles set from attributes in each SAML assertion at sign-in | Identity team, in the identity provider's attribute statements, with the Mattermost configuration matched to them | Workforce users who sign in through SAML and whose role should follow a group or attribute in the identity provider |
| System Console role assignment | System admin and member roles set by hand for individual accounts | Mattermost system administrators | A small number of named administrators, or a one-off change that should not depend on the identity provider |
| AD/LDAP admin filter | System admin role for accounts synced from the directory | Directory administrators, through the LDAP admin filter configured in Mattermost | Directory-backed accounts. It does not act on SAML users, so do not expect it to grant admin rights to SAML-only accounts |
| Guest status | Limited guest access for external users who should see only selected channels | Mattermost administrators and team or channel owners, with guest provisioning set by the identity source | Contractors, partners and other external people who need access to specific channels rather than the whole workspace |
| Mixed SAML and directory accounts | Roles that may be set by more than one source for the same user | Identity and Mattermost administrators jointly | Environments that use both SAML and AD/LDAP sync. Confirm in a test tenant which source wins before rollout |
Why the AD/LDAP admin filter does not reach SAML users
The AD/LDAP admin filter belongs to the directory login path and does not evaluate SAML sessions. A team that expects a directory group to grant system admin rights when users sign in through SAML will be surprised, because the filter that promotes users to admin during AD/LDAP sync is never applied to a SAML login. Plan admin rights as a separate decision, not as a side effect of the SAML login.
In practice, system admin rights for SAML users must come from one of three places: the SAML attribute mapping that drives the admin role, a manual setting in the System Console, or a separate directory sync design in which admin status is set by a process you control. Each option has different audit and change-control characteristics. The SAML mapping keeps the decision in the identity provider, but it depends on the attribute being released correctly in every assertion. Manual console settings are easy to make and hard to review at scale, so they need a named owner and a periodic review.
Confirm this behavior against the exact Mattermost release you run before you write the access model down, because the page should not be read as holding across all versions. Test it with a non-production admin account: sign in through SAML with a user whose identity provider attributes would grant admin, then check the role in the System Console, and repeat with a user who lacks the attribute. Record the results for each release you plan to run, and repeat the test after every upgrade, since role handling is part of the authentication path that changes between versions.
Configure SAML role attributes and test them before rollout
This sequence confirms the SAML sign-in works for a standard user, adds and maps the admin and guest attributes, and proves each role lands correctly before any real user depends on it. Each step ends with a check and a rollback so a wrong mapping never reaches the whole organization.
Confirm standard SAML sign-in works first
Before touching roles, sign in to the test Mattermost server with a standard test user through the SAML connection already in place. The Mattermost administrator confirms the account is created with the expected email, username and ID values and that it lands as a regular member with no admin or guest flags. Check the user record in the System Console and the server logs for the SAML login entry. If sign-in fails here, stop: role attributes will not fix a broken assertion. Rollback: none needed on production, since this step only observes; if you changed SAML settings during troubleshooting, restore the saved configuration before continuing.
Agree attribute names and values with the IdP owner
Work with the team that owns the identity provider to fix the exact attribute names and the accepted values for admin and guest status. Attribute names must match exactly, including capitalization and spacing, because Mattermost compares them literally against the assertion. The IdP team owns the values and decides who qualifies, so the written agreement should name the group or rule behind each value and who approves changes. Record the agreed names and values in your change ticket. Check: both teams can point to the same written list. Rollback: nothing is changed yet, so the only cost is a delay in the schedule.
Add the role attributes to the IdP assertion
The IdP administrator adds the agreed attribute statements to the SAML assertion for the Mattermost application only, and sends them only to the test cohort at first. Values should come from a source the IdP team controls, such as a group membership, so that role changes happen in one place. Ask the IdP team to confirm the attribute is present in a sample assertion. Check: a decoded test assertion for the test admin and the test guest shows each attribute with the agreed name and value. Rollback: remove the new attribute statements from the Mattermost application in the IdP, which returns assertions to their previous content.
Map the attributes in Mattermost SAML settings
In the System Console, open the SAML settings and enter the attribute names for the admin and guest roles exactly as they appear in the assertion. Save the configuration and leave the mapping in place only on the test server. Do not rely on the AD/LDAP admin filter for this, since it does not apply to SAML users. Check: the saved setting shows the same attribute names agreed in step two, with no trailing spaces. Rollback: clear the role attribute fields and save, which returns role assignment to the previous behavior for new sign-ins.
Sign in with a test admin and a test guest
Sign in to the test server with one account whose assertion carries the admin value and one whose assertion carries the guest value. Use fresh sign-ins, since roles are applied when a user signs in, and sign out between tests. Note what each account can see and do. Remember the one-way rule: a guest role can be removed by the attribute, but an account that is demoted from guest does not regain guest status through the same route in the way you may expect, so test a guest account that you are willing to leave as a guest. Check: the test admin reaches the System Console and the test guest cannot. Rollback: if a test account has the wrong role, correct the IdP value, then sign in again or use the System Console to reset the role on the test account.
Verify roles in the System Console and user list
Open the System Console user list and check each test account's role and status against the agreed table from step two. Confirm that the standard user from step one remains a regular member and that no production users were affected by the test mapping. Review the server logs for role-related messages from the SAML login. Ask the IdP owner to confirm the assertion values match what Mattermost recorded. Check: every test account matches the expected role, and the agreed table is signed off by both teams. Rollback: if any result is wrong, clear the mapping, return the IdP application to its previous assertion, and repeat from step three after fixing the cause.
How a SAML sign-in turns attributes into a Mattermost role
The flow starts when a user signs in at the identity provider, which issues a signed SAML assertion carrying attribute statements. Mattermost validates that assertion on its side of the trust boundary and reads the admin and guest attributes, then either sets the account role or leaves it unchanged. Guest demotion is shown as a separate, one-way path, so teams can see that a user who has been made a guest is not promoted back by a later sign-in. Check the attribute names and values on both sides before rollout, because a mismatch leaves roles unchanged without an obvious error.
Attributes in the SAML assertion decide the Mattermost role at each sign-in.
How the one-way guest demotion rule changes rollouts
Treat a demotion to guest as a decision that is hard to reverse, and settle the rollout plan before any attribute is mapped. When the guest attribute is set on a SAML assertion, the account can end up with a reduced role that a later change to the identity provider does not simply undo. Before go-live, decide three things in writing: how guest accounts are created, who reviews them, and how a mistaken demotion is corrected. Those answers belong in the rollout plan, not in a support ticket written on the day someone loses access to a channel they need.
The operational consequence falls on test accounts and contractors, who are the populations most likely to be placed in a guest role on purpose or by accident. Give each group an explicit attribute value and a named owner who answers for it, so that an unlabeled account is never assumed to be a guest and an intentional guest is never mistaken for a fault. Record who can change the attribute in the identity provider, since that person effectively controls Mattermost role assignment. Avoid relying on a default value to stand in for an owner.
Confirm the exact scope of the rule on a test server before you rely on it. Check the current Mattermost documentation for which role changes are one-way, whether a demoted account can be promoted again through the System Console, the API or the command line, and what history or permissions are kept during that process. Then run the test deliberately: demote a test user, change the attribute back in the identity provider, sign in, and record the resulting role. Do not assume that reverting the attribute in the identity provider restores the prior role. The result of that test should be the correction procedure your operators follow.
Mattermost admin role mapping risks to control
Role mapping from SAML assertions gives your identity provider authority over who administers and who can enter Mattermost. Each card below names a risk, the control that addresses it, and the check you can run before and after go-live.
Over-broad admin attributes
If the SAML admin attribute matches a large group, such as every member of an IT or engineering directory group, those users become Mattermost system admins at their next sign-in. Confirm which IdP group or claim value grants the admin role, then count the users who currently hold it in the System Console. Compare that count with the people who need admin rights for their job. An illustrative check: a group named for a department rather than a platform role usually matches more people than intended.
SAML SSO docsAttribute values editable by non-admins
A role attribute is only as trustworthy as the people who can change it. If helpdesk staff, team leads or users with self-service profile edits can alter the source attribute or the group membership that feeds it, they can grant themselves admin through the identity provider. Make the IdP administrators the named owners of the admin and guest attributes, restrict edit rights to a small role, and review who holds those rights each quarter.
Role drift after IdP changes
Renaming a directory group, changing a claim rule, or moving a user between groups can change Mattermost roles without anyone noticing, and the mapping does not always re-evaluate existing accounts the way you expect. Test each change in a staging server with a test user for every role. Record the expected Mattermost role for each IdP group so that a mismatch after a change is easy to spot.
No named break-glass admin
If the only system admin depends on the SAML login, a broken IdP certificate, expired metadata or a locked account can leave nobody able to fix the server. Create one local break-glass admin account with a password stored in your secrets system, record who may use it, and test a sign-in to it on a schedule. Confirm that the account is excluded from the SAML role mapping so the IdP cannot demote it.
Unreviewed guest status for external users
Guest accounts for contractors, partners or customers depend on the guest attribute being set correctly at provisioning. A user who should be a guest but receives a member role gains access to channels and teams they should not see. Review the guest attribute and the teams and channels each guest can reach, and confirm with the business owner that every external identity still needs access. Note that a guest role assigned by SAML cannot be promoted back to a member by the same attribute, so check the rule before you rely on it.
Unlogged role changes
When a role changes because an IdP attribute changed, the reason may exist only in the identity provider logs, and the Mattermost audit trail may show only the result. Confirm where role changes are recorded in your deployment, forward Mattermost server logs to your central log platform, and keep identity provider change logs for the same period. Then test one role change end to end and confirm that you can reconstruct who changed the attribute, when, and what Mattermost did in response.
What does setting up Mattermost SAML role mapping cost and take?
What drives the cost of setting up Mattermost SAML role mapping?
The cost depends mainly on how many identity providers, environments and attribute decisions are involved, and on who performs each step. The work has a few parts: confirming which SAML attributes the identity provider can send, configuring the admin and guest mappings in the identity provider and in Mattermost, testing each role path, and documenting the result. A single identity provider with one clear attribute owner is the simplest case. Multiple environments, custom claim rules or an identity provider you do not administer add time. Ask any partner for a quote that lists each of these parts separately so you can see what is one-time work and what is ongoing.
How long does Mattermost SAML role mapping take to set up?
Duration depends mainly on how quickly you can get identity provider access and how long testing takes, not on the Mattermost settings themselves. Mapping a few attributes is quick once the identity provider team confirms what it sends. Delays usually come from waiting for admin access, agreeing who owns each attribute, and running test accounts through admin and guest paths in staging before production. Confirm with any provider which of these steps are included in the written scope and which depend on your team's availability.
What must our team provide before role mapping work starts?
You need four things ready before work starts: administrator access to the identity provider, a named owner for each SAML attribute that controls admin or guest status, a set of test accounts covering a system admin, a regular member and a guest, and a sign-off owner who accepts the test results. Without an attribute owner, nobody can decide what values mean admin or guest, and changes stall. Without test accounts, the one-way guest demotion rule may only surface in production. Put these dependencies into the scope so that delays are visible early.
Can our own team set up SAML role mapping without a partner?
Yes, if your identity and platform engineers have the access and time, and they understand that SAML users are not governed by the AD/LDAP admin filter. The work is well documented and small in code terms, so the main risk is process rather than technology. A partner is most useful when the identity provider is managed by another team, when several environments must match, or when you need evidence for an assessment. Whichever path you choose, have someone other than the implementer test the admin and guest paths before go-live.
How does a partner scope role mapping work in writing?
A written scope should name the identity provider and version, the Mattermost deployment and environments in scope, the attributes and values that map to system admin and guest, the test cases, the documentation delivered, and the responsibilities of each party. It should also state what is excluded, such as changes to the identity provider's wider claim rules or user provisioning. Ask the partner to list the access you must provide and the dates on which sign-off is expected. A scope that omits test cases or the sign-off owner is incomplete.
What recurring work follows go-live for SAML role mapping?
After go-live, the recurring work is reviewing who holds admin and guest status when the identity provider's attribute values change, re-testing the mappings after Mattermost upgrades and after identity provider changes, and keeping the runbook current. Mattermost publishes server releases monthly and has Extended Support Releases, so plan a retest with each upgrade you adopt. Ask any partner whether post-launch support, retesting or a retainer is included, and what it costs to add it later.
What should we ask for in a quote for this work?
Ask for a fixed scope listing each deliverable, the identity provider and Mattermost versions covered, the test cases for admin and guest roles, the access and attribute decisions you must supply, the sign-off process, and a clear statement of what happens after go-live. Ask whether the quote covers only the first environment or every environment you run. Also ask how changes requested during testing are priced. Mattermost pricing is not published, so confirm with your Mattermost provider which plan includes SAML in your environment before you finalize the scope.
Limits to confirm in your environment before rollout
Role mapping from SAML assertions depends on the plan you buy, the server release you run, and how the rest of your identity stack touches the same accounts. The cards below list the points to confirm with Mattermost and test in a lab before any admin or guest attribute reaches production.
Plan level that includes SAML
SAML is not available on every Mattermost plan, so the role mapping only works if your subscription includes it. The pricing page lists SSO (SAML, OIDC, OAuth) from the Professional plan upward, but confirm the tier against your written order, since plan contents change. Ask the vendor to confirm in writing which plan covers SAML role attributes in your deployment, and whether any guest or admin features sit behind a higher tier.
Pricing pageAttribute behavior in your release
Attribute handling for admin and guest roles should be checked against the exact server version you run, not against documentation for an older release. Find your version on the server releases page and confirm its support window before you rely on the behavior. Build a lab with the same version, then test a promotion, a demotion, and a login by a user whose attribute is missing.
Server releasesInteraction with AD/LDAP sync
If AD/LDAP synchronization runs alongside SAML, the directory may set or clear fields that the SAML assertion also controls, and the admin filter that applies to directory users does not govern SAML users. Decide which system is the source of truth for system admin and guest status, and test what happens when both sources disagree. Ask the vendor how sync cycles order these updates.
Identity provider claim handling
Each identity provider sends attributes in its own claim format, and a mismatch in claim name, value casing or multi-value handling can silently fail to grant a role. Review the setup guide for your provider, including the SAML SSO Okta, Entra ID, AD FS and OneLogin pages in the sibling set, and confirm the exact claim name and expected value. Test with a test account in each group rather than assuming the mapping works from a configuration screen alone.
Existing accounts changing auth method
Accounts created with email login and later moved to SAML may keep their current role until the next assertion arrives, which can leave an admin or guest status out of step with the identity provider. Review how migrated accounts are matched, what role they hold after the switch, and whether the first SAML login resets it. Plan a dry run with a copy of your user list before you move production accounts.
Visibility in audit and support data
Privilege changes are a control point that auditors and incident responders ask about, so you need to know whether a role change leaves a record. Confirm with Mattermost which audit or log entries capture a change to system admin or guest status, how long they persist, and whether they show the source as SAML or a manual change. Verify this in your lab by changing a role through the assertion and then checking the logs your team would actually read.
How DeployOpen works on this
DeployOpen scopes Mattermost admin and guest role mapping from SAML attributes as a written, fixed-scope piece of work, covering the identity provider claims, the System Console settings and the access model your organization needs. The work is built and tested in your own infrastructure, then handed over with runbooks your team can operate.
How we scope
- Inventory which SAML attributes your identity provider sends and which values should grant system admin or guest status.
- Document who approves admin rights and how guest access maps to your external collaboration policy.
- Agree in writing which SAML identity provider, Mattermost server version and deployment environment the work covers.
How we build
- Configure the admin and guest attribute mappings in the SAML connection and confirm the claim names with your identity team.
- Test admin promotion and guest demotion with dedicated test accounts before any production user is affected.
- Document the one-way demotion behavior for guests so your team knows which changes need a manual step.
How we hand over
- Deliver a written role mapping specification with attribute names, accepted values and the owner of each mapping.
- Provide test results, a rollback note and a checklist for reviewing system admin membership after each change.
- Walk your identity and Mattermost administrators through the runbook so changes can be made without us.
How we support
- Review role mapping again when you change identity providers, Mattermost versions or your admin approval policy.
- Check role mapping as part of Mattermost upgrade planning, since release notes can affect identity behavior.
- Ongoing support, upgrades and continuous testing are available as a retainer, scoped separately from the original engagement.

