Pulling Active Directory account info via alias email address

I have been working on a PHP project that interfaces with active directory through LDAP.  I noticed that some accounts weren’t being resolved via email address.  I thought, hmm this is strange…  After a few hours, I finally figured out that the issue was due to an alias email address.  By default, the “mail” attribute only has the main email address listed, so any alias addresses will not be searched upon lookup.

Solution?

Use this query to select an item from AD via its alias email address:

(proxyAddresses=smtp:[email protected])

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.