Query AD - Part 2  
Author Message
jpbos76





PostPosted: Top

SQL Server Developer >> Query AD - Part 2

Hello,

I have set up a linked server to connect to my Active Directory. I am
trying to query Active Directory to find out all of the users from a
particular Security Group. I have generated the correct LDAP string for
the Security Group, but my query does not return anything. Below you
will find the query I am using:

SELECT *
FROM OPENQUERY( ADSI,
'SELECT Name, SN, ST
FROM
''LDAP://My-Domain.com/CN=Development,OU=Development,DC=My-Domain,DC=com''
WHERE objectClass = ''User''')

Can anyone help me in finding how to get the list of users in the
Development Group above?

SQL Server202