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.
Use this query to select an item from AD via its alias email address: