fix(ldap): resolve group members via 'member' fallback for missing 'm… - #1362
Open
amikuss wants to merge 5 commits into
Open
fix(ldap): resolve group members via 'member' fallback for missing 'm…#1362amikuss wants to merge 5 commits into
amikuss wants to merge 5 commits into
Conversation
…emberOf' backlinks
amikuss
requested review from
Marshall-Hallenbeck,
NeffIsBack,
mpgn and
zblurx
as code owners
August 14, 2026 08:09
NeffIsBack
requested changes
Aug 14, 2026
NeffIsBack
left a comment
Member
There was a problem hiding this comment.
Thanks for the bug fix PR!
So far, the search preparation and display logic was separated because there were only small differences in both code branches. Since this is much more logic now, please just make a big if/else to separate between searching all groups and looking at a specific group.
NeffIsBack
approved these changes
Aug 24, 2026
NeffIsBack
left a comment
Member
There was a problem hiding this comment.
@amikuss please retest if the changes still solve your problem. In my case, the unresolved group members were foreign domain members and therefore the DC returned a referral error. In such cases I have simply added the dn as fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

…emberOf' backlinks
Description
Added a fallback checking "members" attribute for the --groups "GROUP" argument.
If a user's "memberOf" backlink has not been populated, the current memberOf/primaryGroupID check does not return the user when running --groups "GROUP", even though --groups returns the correct number of group members.
I ran into this issue in a HTB CAPE environment, where a Foreign Security Principal's memberOf was not set, even though it was a member of a group. See screenshots below.
AI disclosure: Claude Sonnet 5 was used for some coding help.
Type of change
Insert an "x" inside the brackets for relevant items (do not delete options)
Setup guide for the review
I have been unable to reproduce this issue as the memberOf attribute is dynamically maintained, including FSPs.
I was unable to figure out why this was not the case in the CAPE lab environment and honestly unsure if this PR is necessary given that this seems like a very environment-specific quirk.
Screenshots (if appropriate):
Before:

After:

Checklist:
Insert an "x" inside the brackets for completed and relevant items (do not delete options)
poetry run ruff check ., use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)