I'm trying to make a ldap query which I can run in active directory tool, so I can have an overview of all users with their groups.

What do I need to add to this script to see the groups of these users ?

&(objectCategory=person)(objectClass=user) (givenName=)(sn=))



1 Answer 1


This is not a script, this is a LDAP filter which means :


Retrieve the entries which are of the type person AND user AND which possess these attributes populated : givenName AND sn

If you want to retrieve the groups which these users are member of, configure on the tool that you want to also retrieve the attribute memberOf from the users entries filtered.

As stated in the Subject of the question, if you want to know the members of the group MyGroupName, retrieve the member attribute of this group filtered by a LDAP filter, for example, such as :


  • How do I combine the two requirements than ? :s
    – Joep
    Jun 14, 2017 at 10:02
  • 1
    What do you mean by combine? You retrieve either the groups with their members OR the users with their groups.
    – Esteban
    Jun 14, 2017 at 10:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .