How to query the User List from MS Active Directory
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,
from 'LDAP://myADServer.com/OU=OrganizationalUnit,DC=DOMAIN,DC=NAME'
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.
Comments
-
The same approach can be used for a variety of other systems accessible through properly formatted connection strings. Here is a resource for connection strings for other apps and systems.
ConnectionStrings.com - Forgot that connection string? Get it here!
1 -
Connection string is only one way to configure a driver.
In Board can be used only if an OLE DB provider 64bit is installed on the server.
Fabio
0 -
Is there a way to leverage this that works around the 1000 row limit in the AD query? We need to download over 20,000 users. We considered breaking it out into 26 data readers by alphabet using first character of user name but still this didn't resolve as some letters have over 2K records.
0 -
I suspect that's a limitation of the ODBC connection. You may want to pull the list down with a script first, and then load it as a CSV file. Here is an article explaining how to do so.
0