#19942·datahub

Users list "Role" column shows an arbitrary role (e.g. Reader) when a user inherits several roles from groups (regression in v1.7.0)

Author: dahaCreated Sep 23, 2026Updated Sep 23, 2026

Describe the bug

Since v1.7.0, the Role column in Settings → Users & Groups → Users shows a role inherited from a group, and when a user inherits several roles it picks one arbitrarily. Users who are in a group bound to Editor are shown as Reader because another of their groups is bound to Reader.

Clearing the role ("No Role") does not help: the direct roleMembership aspect is emptied correctly, but the column still shows Reader after refresh. From the admin's point of view the value "jumps back".

Cause, as far as I can tell:

  • EntityRelationshipsResultResolver.mapMembershipRelationships answers corpuser + IsMemberOfRole + OUTGOING with BoundMembershipAccess.effectiveRolesForUser(...). That returns an unordered Set<Urn> of direct roles plus roles inherited from groups. This came in with the entity graph cache (#17886) and was backported to v1.7.0 in #19548. Before that, the same query returned only direct role edges.
  • UserListV2.tsx (and UserListItem.tsx) show user.roles.relationships[0], so the role shown is whichever comes first in that set.
  • The UI does not mark a role as inherited, so it looks like an explicit assignment that can't be removed.

Effective permissions look fine: the PolicyEngine grants the union of roles. Only the display is wrong.

To Reproduce

  1. Create group A with role Reader and group B with role Editor.
  2. Add user u to both groups. Do not give u a direct role.
  3. Open Settings → Users & Groups → Users and search for u.
  4. The Role column shows Reader.
  5. Set u to "No Role" and confirm. After refresh it shows Reader again.

GraphQL on v1.7.0, for a user with no direct role in groups bound to Reader and Editor:

graphql
{ searchUsers(input: {query: "u", start: 0, count: 1}) {
    searchResults { entity { ... on CorpUser {
      roles: relationships(input: {types: ["IsMemberOfRole"], direction: OUTGOING, start: 0}) {
        total relationships { entity { urn } } } } } } } }

returns total: 2, [urn:li:dataHubRole:Reader, urn:li:dataHubRole:Editor]. Meanwhile GET /openapi/v3/entity/corpuser/<urn>?aspects=roleMembership returns {"roles": []}, and the /relationships endpoint returns no IsMemberOfRole edges.

Expected behavior

The Role column should show the user's effective role in a predictable way:

  • When all the roles are built-in, show the highest one (Admin > Editor > Reader), so the user above shows Editor.
  • Custom roles can't be ranked in general. For those, show all roles (e.g. Editor +1, with the rest in a tooltip, like the Assigned Groups column) instead of picking one.
  • Mark inherited roles (e.g. "Editor (via group B)") separately from the direct assignment. Editing through the dropdown should only show and change the direct role, so "No Role" doesn't appear to be ignored.

Screenshots

Users list: several users who belong to both a Reader-bound and an Editor-bound group all show Reader.

Environment

  • DataHub server v1.7.0 (commit 7f81ccbfe27b9acc947f5f600fcf9ddb72138a80)
  • Groups and memberships ingested from Azure AD (origin.externalType: AZURE_AD); roles bound to groups via roleMembership on the corpGroup

Additional context

  • Related but different: #10667 (a stale role shown after search; that one goes away with a hard refresh).
  • Code references (v1.7.0):
    • datahub-graphql-core/.../resolvers/load/EntityRelationshipsResultResolver.java: isMembershipQuery / mapMembershipRelationships
    • datahub-web-react/src/app/identity/user/UserListV2.tsx: Role column render (relationships[0])