I am looking for an LDAP query that would retrieve Exchange distribution lists.
If I am doing the simple (objectClass=Group)
I will get too many groups, most of them not useful.
LDAP filters are filter strings that you use to specify a subset of data items in an LDAP data type.
I would use groupType attribute to identify distribution lists. Here you can find info how to tell the difference between security/ distribution.
And filter can look like that:
(&(objectClass=group)(!(groupType:1.2.840.113556.1.4.803:=2147483648)))
EDIT alternatively, you may want to check for groups that has e-mail addresses in exchange, smth like:
(&(objectClass=group)(proxyAddresses=*))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With