Skip to main content
2 of 2
added 537 characters in body
mrdenny
  • 27k
  • 2
  • 43
  • 81

You should still be able to create a linked server to an LDAP database and query the LDAP database directly via the linked server.

There's information here on setting up the linked server.

To test I setup the linked server based on this post. Then I ran the following code and got back a recordset with various information in it (where bacon.lab is my AD domain).

SELECT * FROM OpenQuery ( 
  ADSI,  
  'SELECT displayName, telephoneNumber, mail, mobile, facsimileTelephoneNumber 
  FROM ''LDAP://bacon.lab''
  WHERE objectClass =  ''User'' 
  ') AS tblADSI
ORDER BY displayname
mrdenny
  • 27k
  • 2
  • 43
  • 81