Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Active Directory members of a group

Author  Topic 

JordyDB
Starting Member

8 Posts

Posted - 2012-03-26 : 03:22:08
Hi all,

I want to get all users of a specified group in my Active Directory.
I've found this query:

SELECT
*
FROM OPENQUERY(ADSI,'<LDAP://DC=excon,DC=local>;(&(objectCategory=user)(objectClass=user)(members=ExpertConsultingbvba,OU=Groups,OU=Sint-Amands,DC=excon,DC=local));cn,ADsPath;subtree')

I also tried member_of function.

This query gives no result... And there are no errors in the paths.
   

- Advertisement -