Rocket.Chat SAML role sync: when identity provider data should drive roles and rooms
Let the identity provider decide roles and channel membership when the same group or attribute already governs access to other systems and a regulated team needs those decisions to be reviewable in one place. In Rocket.Chat, that means SAML assertions carry the attributes that set who a user is, and the server applies them at sign-in. Admins still own the design: which attributes are trusted, which roles can be granted from outside, and which rooms are allowed to change automatically. Manual administration fits better for small teams, for roles that are rarely reviewed, and for any room where membership must be approved by a named owner rather than by a group claim.
The assertion is the signed XML message the identity provider sends when a user signs in. It carries the subject and any attributes the provider releases, such as group names or role values. Rocket.Chat reads those attributes through its SAML settings. When Sync User Roles is enabled, the roles named in the assertion are applied to the account. The Role Attribute Name setting controls which attribute is read for roles, and it applies only to new users, so existing accounts keep their current roles until an admin changes them. Confirm this behavior in your version's SAML configuration documentation before you rely on it for offboarding or role removal, because a removed group in the identity provider may not remove the role in Rocket.Chat on its own.
Before you turn these settings on, confirm three things with your identity provider team: which attribute names the assertion really carries, whether group values are sent as names or identifiers, and how many groups a typical user belongs to. Test with a small pilot group and check the resulting roles and room memberships in the Rocket.Chat administration screens. Record who owns each mapping and how a change is reviewed, because the identity provider becomes the approval point for access that auditors will ask about.
Which SAML role and room settings fit your access model
This table compares the four SAML settings that decide how roles and channel membership follow the identity provider. Read each row against your access model to see which setting controls the behavior you need, when it applies, and what it cannot do. The main takeaway is that role sync, new-user role assignment and room membership are separate settings with different effects, so confirm which are included in your plan before you design around them.
| Setting | What it does | When it fits | Trade-off to plan for |
|---|---|---|---|
| Sync User Roles | Applies roles from the identity provider assertion to users on sign-in, so role changes made upstream reach Rocket.Chat. | Organizations that manage roles centrally and want the identity provider to remain the source of truth. | Roles set manually inside Rocket.Chat may be overwritten at the next login, so agree the ownership model first. |
| Role Attribute Name | Names the assertion attribute that supplies roles, and applies those roles only when a user account is created. | Setting initial roles for newly provisioned staff, such as a default role for a new department. | It does not change roles of existing users, so later role changes need Sync User Roles or a manual update. |
| Update Room Subscriptions on Each Login | Refreshes a user's channel membership from the SAML assertion each time they sign in. | Teams whose channel membership should follow group membership in the identity provider. | Users removed from a group upstream lose membership at next login, so channels they still need must be covered by the assertion. |
| Include Private Rooms in Room Subscription | Adds users to private rooms listed in the assertion. Without this option, private rooms are not changed by the assertion. | Restricted project or leadership rooms that must match an identity provider group exactly. | Private room access becomes an identity provider decision, so review group membership and the rooms listed before enabling it. |
How to configure role and room sync in SAML
This sequence turns your identity provider's SAML assertion into Rocket.Chat role assignments and channel membership, and it confirms each piece works for a new user and a returning user before you roll it out.
Confirm plan eligibility and SAML access
Confirm with your Rocket.Chat account contact or in the plans documentation that your workspace is on a plan that includes SAML single sign-on and the role and room options you intend to use. Confirm the server version you run, since the settings can differ between release lines. Confirm that a SAML provider is already signing users in successfully, because role and room sync is layered on top of a working login. Done when you can name the plan, the version and a test account that signs in through SAML today.
Define the group or role attribute in the identity provider
In your identity provider, decide which attribute will carry Rocket.Chat roles and which will carry room memberships, for example a multi-value group or role claim, and agree the exact claim name and the values it will contain with the team that owns the identity provider. Assign test users to a small number of groups that match your planned roles and rooms. Check the attribute in a SAML response trace from a test sign-in, confirming the claim name matches what you intend and that each value appears as expected. Done when the trace shows the attribute with the correct values for each test user.
Set the role attribute name in Rocket.Chat
In the Rocket.Chat administration console under the SAML provider settings, enter the claim name from the previous step in the Role Attribute Name field. Note that this setting applies roles to new users only, so existing accounts keep their current roles until you change them manually or through another process. Save the configuration and record the values in your change log. Done when the setting shows the exact claim name, and a review of the saved configuration matches the trace you captured.
Enable Sync User Roles and room subscription options
Turn on Sync User Roles so roles are refreshed from the assertion at each login. Turn on Update Room Subscriptions on Each Login to add and remove channel membership based on the assertion at each sign-in. Turn on Include Private Rooms in Room Subscription only if you have decided that identity-driven access to private rooms is acceptable and have documented which rooms are in scope. Confirm each option is saved and record who approved private room inclusion. Done when the three settings reflect your written decision.
Test with a new user
Create a test user in the identity provider that belongs to the groups you mapped, then sign in to Rocket.Chat through SAML for the first time. Check that the account received the expected role, using the user's profile in administration, and that it joined the public rooms your mapping defines. Check the SAML response trace again to confirm the same values reached Rocket.Chat. Done when the new account shows the expected role and room memberships, and the trace matches what you saw in the identity provider.
Test with a returning user and a changed group
Change the test user's group membership in the identity provider, removing one room group and adding a role group, then have the user sign in again. Check that Rocket.Chat updated the room subscriptions when Update Room Subscriptions on Each Login is on, and that the role change applies only if your configuration and version support that path for existing users. Note any difference between new-user and returning-user behavior. Done when the room membership after the second login matches the new group set and the behavior is recorded.
Document the result and plan the rollout
Write down the final attribute names, the enabled options, the private room decision, the test results and any behavior that differed between new and returning users. Ask your Rocket.Chat account contact or consult the SAML configuration documentation to confirm any behavior you could not verify in your environment. Schedule a review after the first wave of real logins. Done when the record is approved by the owner of the identity provider and the Rocket.Chat administrators.
Why new users and returning users get different results
The Role Attribute Name setting applies roles only when an account is created. A user who already exists keeps the roles they were given on first login, even if the claim that should drive those roles changes in the identity provider afterward. Treat the setting as an onboarding rule, not a synchronization rule. Before go-live, confirm with your own environment's test accounts that a returning user with a changed claim does not pick up the new role, and document what your team must do by hand to change an existing account's roles.
This split has direct consequences for offboarding, role changes and audits. If an employee moves from a standard role to an administrator-equivalent role in the identity provider, the change will not reach their Rocket.Chat account through role attributes alone, so the account can keep elevated permissions it no longer should have. The same gap applies to removals: disabling the user at the identity provider blocks future sign-ins, but any role an existing account already holds remains in Rocket.Chat unless a separate process removes it. Build role reviews into your access process and treat the Rocket.Chat admin user list as a record that needs checking, not one that updates itself from the directory.
Room membership behaves differently from roles. With Update Room Subscriptions on Each Login enabled, channel membership is refreshed from the SAML assertion at every sign-in, so a user removed from a group in the identity provider is pulled out of the mapped channels the next time they log in. That makes room membership the closer of the two to live state, but only for users who log in. A dormant account keeps its memberships until its next sign-in, so pair this setting with a review of inactive accounts. Confirm, before relying on it, how your version handles Include Private Rooms in Room Subscription, since adding users to private rooms from assertions is the step most likely to surprise an auditor.
How a SAML login carries roles and rooms into Rocket.Chat
The flow starts when a user signs in at the identity provider, which returns a SAML assertion carrying attributes. Rocket.Chat then reads that assertion at login: Sync User Roles and Role Attribute Name apply to new users, and room subscription updates apply on every login, with private rooms added only when the separate option is enabled. Check the trust boundary at the assertion, since Rocket.Chat acts only on attributes it receives.
Trust boundary between the identity provider's assertion and Rocket.Chat's login processing.
Security risks when the identity provider controls room access
When the identity provider decides roles and room membership, a single attribute change can move a user into admin rights or a private room. The cards below cover the failure modes that matter most for Rocket.Chat SAML role sync and room membership, with a check you can run for each.
Over-broad attribute values grant admin roles
Role Attribute Name maps an assertion value to Rocket.Chat roles for new users, so a broad group or attribute value can hand out administrative access at first login. Review every value your identity provider can send for that attribute, and confirm which values map to admin or moderator roles in your configuration. Test with a pilot account whose attribute you control before enabling the mapping for the wider directory.
SAML configuration docsStale memberships when updates are off
If Update Room Subscriptions on Each Login is disabled, a user who leaves a team keeps their channel memberships after the assertion no longer lists them. Compare a sample of users' channel memberships against their current directory groups after a role change. Decide whether removal is handled by this setting, a manual process, or a scheduled review, and document which one applies.
Private room exposure from the include option
Enabling Include Private Rooms in Room Subscription adds users to private rooms named in the assertion, which can expose sensitive conversations to anyone the directory places in that group. Inventory which private rooms would be affected before enabling the option, and confirm the group names that feed them are owned and reviewed by a named team.
Attribute spoofing and misconfiguration
Room and role decisions are only as trustworthy as the assertion that carries them, so an unsigned or incorrectly mapped attribute can grant access that no one intended. Confirm that assertions are signed, that the identity provider releases only the attributes Rocket.Chat needs, and that the attribute names in the Rocket.Chat configuration match the identity provider exactly. Test with a deliberately wrong value to confirm it is rejected or mapped to a safe default.
Role drift between systems
New users receive roles from the assertion only once, so later changes in the identity provider may not match the roles held in Rocket.Chat. Over time, a person moved out of a function can keep administrative or moderator rights while their directory record looks correct. Schedule a periodic comparison of Rocket.Chat role holders against the identity provider groups, and record who approves each exception.
Logs that prove who had access when
When an auditor asks who could read a private room on a given date, you need membership history and login records, not just the current state. Confirm with your Rocket.Chat plan which audit and session logs you can retain, and export a sample of membership changes to verify the records answer that question. Agree on retention with your compliance team before go-live.
Questions buyers ask about SAML role and room sync
Can our own team configure SAML role and room sync without a partner?
Yes, a capable team can set this up in-house, and the core settings are documented in Rocket.Chat's SAML configuration guide. The work is mostly about deciding which assertion attributes map to which roles and rooms, then proving the mapping with test accounts before real users log in. Teams without a Rocket.Chat administrator who has tested SAML before, or without an identity administrator who can change claims at short notice, usually find the testing loop is what takes longest. A partner is useful when you want the mapping designed and verified against your group structure, or when you need written evidence of the test results for a security review.
What drives the effort for role and room sync?
Effort is driven by four things: how many identity provider groups must map to roles, how many private rooms must be populated from assertions, how much access your identity provider team can give you for claim changes, and how thoroughly the mapping is tested. Each additional group or private room adds mapping rules and test cases. Limited access to the identity provider slows every iteration, because each claim change needs an administrator to make it. Ask for the scope to list the groups, rooms and test accounts explicitly, since those counts are what move a quote.
What do we need from our identity and Rocket.Chat administrators?
You need an identity administrator who can view and edit the SAML application's attribute mappings, export the group membership that should drive roles and rooms, and confirm which group names are authoritative. On the Rocket.Chat side, you need an administrator who can change SAML settings and create test users. Both teams should agree on who owns the mapping after handover, because a change to a group name in the identity provider will silently change access in Rocket.Chat. Written ownership of each group-to-role and group-to-room rule prevents that drift.
Are existing users updated when their group membership changes?
Room membership is refreshed at each login when Update Room Subscriptions on Each Login is enabled, so a user's channel list follows the assertion the next time they sign in. Include Private Rooms in Room Subscription controls whether private rooms named in the assertion are included in that refresh. Role Attribute Name applies only to new users, so roles for existing accounts are not changed by that setting alone. Plan a separate process for existing users' roles, such as a scripted review or an admin step, and confirm the exact behavior in your Rocket.Chat version before go-live.
Why does room membership only change at login?
Because room subscriptions are refreshed from the SAML assertion when a user signs in, a user removed from a group in the identity provider keeps their existing room access until their next login. That gap matters for private rooms holding sensitive content. Decide in advance how quickly access must be revoked, whether session handling or device logout is needed for urgent cases, and whether a periodic review of private room membership belongs in the operating routine. Confirm the timing you need with your security team before design starts.
Which premium settings are involved, and do we need a paid plan?
The settings involved are Sync User Roles, Role Attribute Name, Update Room Subscriptions on Each Login and Include Private Rooms in Room Subscription, documented in the SAML configuration guide. Rocket.Chat's free Starter plan includes single sign-on, but the plans page and pricing page list LDAP and SAML user group mapping as paid-plan features, so confirm against the current plan for your version before committing to a design that depends on it. Plan licensing as part of the written scope.
How is the cost of this work quoted?
DeployOpen does not publish a price list. Most engagements are fixed-scope, so the quote follows from a written scope that lists the identity provider, the groups and rooms in scope, the test cases, the Rocket.Chat version and the deliverables, with timelines agreed in writing before work starts. Ask the quote to separate one-time design and build work from any ongoing support or upgrade retainer, and to state what the client must provide, such as identity provider access and test accounts.
What a DeployOpen engagement on this setup covers
A DeployOpen engagement on SAML role sync starts with a written scope that is agreed before any configuration changes are made. The first step is confirming the Rocket.Chat plan and version in your environment, because role sync and room subscription features sit on the paid tier, and the release line decides which admin screens and SAML settings you will see. We also record which identity provider you run, who administers it, and whether your directory already carries group or role attributes that can be released in the assertion. The written scope names the settings in scope, such as Sync User Roles, Role Attribute Name, Update Room Subscriptions on Each Login and Include Private Rooms in Room Subscription, and states what is out of scope, including the identity provider's own claim rules unless you ask for them.
Next, we map each identity provider attribute to a Rocket.Chat role or room. This is the decision that most affects access, so the mapping is documented as a table before it is built: which attribute value grants which role, which rooms a user should join at login, and which private rooms, if any, are populated from the assertion. We also agree how new users are handled, since Role Attribute Name applies roles only to users created after the setting is in place, and existing accounts need a separate plan. Testing covers new users, returning users whose group membership has changed, users who leave a group, and an account that carries no attributes at all. Each path is run against your staging workspace and the results are recorded with the observed roles and room lists.
The handover package includes the final configuration record, the attribute-to-role and attribute-to-room mapping, the test cases with their results, and a short runbook for changing a mapping, rolling back a setting and checking a user's access after an identity provider change. Your team receives the list of items that still depend on your own environment, such as the identity provider's group naming and the agreed review cadence. Pricing and timing follow from this written scope and are quoted separately, so ask for each assumption and each testing path to be listed as a line item so you can see what changes the quote.

