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

active-directoryexchangeldap

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.

Best Answer

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=*))