How to filter for Microsoft Exchange Distribution lists from general AD LDAP groups?

5,846

Microsoft Exchange Distribution lists are just standard AD groups that are "mail enabled". One of LDAP properties you can use to check if given AD group is mail enabled is "proxyAddresses". So you can use the following LDAP filter:

(&(objectCategory=Group)(proxyAddresses=*))
Share:
5,846
dukeofgaming
Author by

dukeofgaming

Loves his computer, all his friends live in it. Eats stress for breakfast. Hates common sense. Intellectual terrorist. Fixes what is not broken.

Updated on September 18, 2022

Comments

  • dukeofgaming
    dukeofgaming over 1 year

    We are integrating an application to Active Directory groups through an LDAP handler, and we need to be able to tell apart AD groups that come from Microsoft Exchange Mail Distribution lists and the rest of them, so we need an LDAP filter for these LDAP handlers that only picks AD groups created from Exchange lists... so far we have not been able to find how to do this by only the means of a filter.

    The reason for this is that we want to be able to delegate control of user groups to the end-users of the application, so that they are able to take better advantage of groups since a good deal of the mailing distribution lists are made on a per project, team or function group basis, and these criterion make a lot of sense for the application.

    We cannot list all of our user groups since most of them are irrelevant and we have an asbsurd amount of them, so we don't want to pollute the application's database.

    • raja
      raja almost 11 years
      so you already have too many groups and now you want users to manage them?
    • dukeofgaming
      dukeofgaming almost 11 years
      they already are, might as well use them
    • raja
      raja almost 11 years
      group sprawl should be contained, not encouraged
  • dukeofgaming
    dukeofgaming almost 11 years
    Yup, it worked, only that objectCategory should be "Group" and not "group"
  • MBu
    MBu almost 11 years
    Thanks for information, I have edited my answer. Interesting thing is that before posting my answer I have verified this filter by using it in "saved query" in "Active Directory Users and Computers" and it worked.