Query to list all users of a certain group

后端 未结 3 1382
伪装坚强ぢ
伪装坚强ぢ 2020-12-23 01:56

How can I use a a search filter to display users of a specific group?

I\'ve tried the following:

(&
    (objectCategory=user)
    (memberOf=MyCus         


        
3条回答
  •  离开以前
    2020-12-23 02:39

    For Active Directory users, an alternative way to do this would be -- assuming all your groups are stored in OU=Groups,DC=CorpDir,DC=QA,DC=CorpName -- to use the query (&(objectCategory=group)(CN=GroupCN)). This will work well for all groups with less than 1500 members. If you want to list all members of a large AD group, the same query will work, but you'll have to use ranged retrieval to fetch all the members, 1500 records at a time.

    The key to performing ranged retrievals is to specify the range in the attributes using this syntax: attribute;range=low-high. So to fetch all members of an AD Group with 3000 members, first run the above query asking for the member;range=0-1499 attribute to be returned, then for the member;range=1500-2999 attribute.

提交回复
热议问题