@@ -72,6 +72,23 @@ Create explicit SAML claims in Entra with the names Cube uses by default.
7272 - ** Display name** — Set ** Name** to ` name ` and ** Source attribute** to
7373 ` user.displayname ` .
7474
75+ If you plan to map Cube roles based on Entra group membership (see
76+ [ Map roles by group] ( #map-roles-by-group ) below), also add a group claim:
77+
78+ 1 . Still in ** Attributes & Claims** , click ** Add a group claim** .
79+ 2 . Choose which groups to include (e.g. ** Security groups** or ** Groups
80+ assigned to the application** ) and pick a ** Source attribute** for the
81+ group name. For most setups, select ** sAMAccountName** or
82+ ** Cloud-only group display names** so the assertion carries
83+ human-readable group names that match the ** IdP group name** values
84+ you'll configure in Cube Cloud.
85+ 3 . Save the claim.
86+
87+ Cube reads Entra's canonical groups claim URL
88+ (` http://schemas.microsoft.com/ws/2008/06/identity/claims/groups ` )
89+ automatically, so no further attribute renaming is required on the
90+ Entra side.
91+
7592## Complete configuration in Cube
7693
7794Return to the SAML configuration page in Cube and provide the identity
@@ -148,6 +165,61 @@ the user's role manually in Cube under **Team & Security**.
148165
149166</Info >
150167
168+ ## Map roles by group
169+
170+ For finer-grained role assignment, enable ** Map roles by group** in the
171+ ** Advanced Settings** section to assign Cube roles based on a user's
172+ Entra group memberships.
173+
174+ To configure group-based role mapping:
175+
176+ 1 . Make sure Entra sends a group claim on the SAML assertion. See the
177+ group-claim step in [ Configure attribute
178+ mappings] ( #configure-attribute-mappings ) .
179+ 2 . In the SAML configuration form in Cube, expand ** Advanced Settings** .
180+ 3 . (Optional) Under ** SAML attribute customization** , set the ** Groups
181+ attribute** to the simple name of the SAML attribute carrying group
182+ memberships. Defaults to ` groups ` . Cube also reads Entra's canonical
183+ groups claim URL automatically, so the default usually works
184+ out of the box.
185+ 4 . Enable the ** Map roles by group** toggle.
186+ 5 . Click ** Add group mapping** and create one entry per group you want
187+ to map:
188+ - ** IdP group name** — the group display name as it appears in the
189+ assertion (case-insensitive). With ** Source attribute** set to
190+ ** sAMAccountName** or ** Cloud-only group display names** , this is
191+ the human-readable group name. If you left the default (group object
192+ ID), use the GUID instead.
193+ - ** Cube role** — pick a default or [ custom role] [ ref-custom-roles ] .
194+
195+ How it's applied:
196+
197+ - On every SAML SSO login, Cube reads the user's groups from the SAML
198+ assertion and assigns the mapped role for each group that matches.
199+ - Group mapping is ** additive** : roles are added on every login, but a
200+ user is never demoted on subsequent logins (e.g. removing them from an
201+ Entra group does not strip the corresponding Cube role — adjust the
202+ user's roles in Cube manually).
203+ - Users whose groups don't match any entry still receive the
204+ [ default role] ( #default-role-for-new-users ) on first login.
205+ - The ** Default role for new users** picker continues to apply at
206+ provisioning time as the always-on baseline.
207+
208+ The same ` groupsRolesMap ` is also consumed by [ SCIM] [ ref-scim ] when
209+ groups are pushed and members are added, so a single configuration drives
210+ both SAML SSO and SCIM group sync.
211+
212+ <Info >
213+
214+ The legacy ` rolesMap ` setting (a translation from raw IdP role values to
215+ Cube role names, applied to the ** Role attribute** ) continues to work
216+ and is applied ** in addition to** ` groupsRolesMap ` . They read different
217+ SAML attributes (` role ` vs. ` groups ` ) and can be used side by side —
218+ typical setups using Entra App Roles for the role attribute and Entra
219+ security groups for the group attribute.
220+
221+ </Info >
222+
151223## Assign users
152224
153225Make sure the new Enterprise Application is assigned to the relevant
0 commit comments