Skip to content

Question: Filtering results for find_groups_for_user #48

@e2robot

Description

@e2robot

I use something like the following to get the groups a user is a member of.

netbios=os.environ["COMPUTERNAME"]
session=domain.create_session_as_computer(netbios)
user_cn="citizenj"
groups=session.find_groups_for_user(user_cn)

Groups variable contains a list of groups with all members of each group.
Is this by design ?
Seems a very heavy query on a large domain with thousands of users in some groups.

I know I can get just the group names by the following

for group in groups:
print (group.distinguished_name)

But is there a way to get just the group names directly without pulling all the members ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions