node-activedirectory icon indicating copy to clipboard operation
node-activedirectory copied to clipboard

isUserMemberOf(), getGroupMembershipForUser() and getUsersForGroup() seem not working?

Open martin0258 opened this issue 2 years ago • 1 comments

Actual result

I have 1 user belonging to 1 group. However, when calling isUserMemberOf with the user and the group, it returned false. When calling getGroupMembershipForUser with the user, it returned empty (i.e., no groups membership). When calling getUsersForGroup with the group, it also returned empty (i.e., no users).

Expected result

  1. isUserMemberOf should return true.
  2. getGroupMembershipForUser should return the group.
  3. getUsersForGroup should return the user.

Discussion

I'm not sure if it is a bug. I found someone indicated that the "member" attribute does not include members for primary group membership, and we should use primaryGroupToken and primaryGroupId to check the membership.

martin0258 avatar Mar 04 '22 12:03 martin0258

yes, same here

ITTV-tools avatar Jul 26 '22 12:07 ITTV-tools