Search code examples
windowsdelphiactive-directorydelphi-2010

Get a list of Active Directory Users along with their Full Name and Email


I need to retrieve a list of Active Directory users and their attributes using Delphi 2010.

I've seen a few similar questions on SO (e.g. Delphi - Find primary email address for an Active Directory user), but they all seem to require the user name before any additional information can be retrieved.


Solution

  • In the end, I discovered TJvObjectPickerDialog, part of JVCL. It wraps the Windows Select Object dialog and does everything I need with very little coding. Just set the required properties and call execute. The selected user objects are returned along with the attributes that you set in the 'Attributes' property.