How to query the User List from MS Active Directory

Document created by dmarocco Employee on Feb 7, 2018Last modified by ggallo on Feb 7, 2018
Version 3Show Document
  • View in full screen mode

If have several tens if not hundreds of users it's likely you're adopting the Enterprise Security Application to manage their credentials

In such situation you need a fast and easy method to get your Users' List into the Application Database, possibly querying your MS Active Directory.


It is important to know that Microsoft Provides an OLE-DB provider to connect to Active Directory Service. 


If not available as part of your OS yet, you can easily download it from several and different MS Packages. Just Google.

At this point your can build a Board Data Connection (OLE-DB Type) with a proper Connection String


such as

Provider=ADSDSOObject; Integrated Security = SSPI

 Username and Password can be explicitly named (UserID and Password)  or integrated through Windows Authentication (Integrated Security=SSPI)

 Attention after clicking on "Save & Connect" button you get a warning message ("Empty or not available Database" ) . Please ignore it ; AD Data are not in a database format , its schema is not available.

Build now your Board Data-reader configuring a Manual Query. Please see the sample below :

Select userAccountControl, employeetype, physicalDeliveryOfficeName, department, company, title,
WHERE objectClass='user' and objectClass = 'person'


This Query returns the list of all the users and some of their most popular attributes you may need.

9 people found this helpful