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)
 get member from AD Group

Author  Topic 

kdeutsch
Yak Posting Veteran

83 Posts

Posted - 2013-01-07 : 15:31:32
trying to get the memebers from active directory groups, would liek to make it a Sp so i can call for multiple asp programs. What I have tried below returns mothing, i know group name is valid in AD.

select member from openquery(ADSI, 'select member
from ''LDAP://myLadp'' where memberOf = ''CN=NGMN Sec Readiness Admin'' and objectCategory=''Person''')


select *
from OpenQuery(ADSI,'SELECT objectCategory, samaccountname
FROM ''LDAP://myLadp'' WHERE objectClass=''group'' and memberOf = ''CN=NGMN Sec Readiness Admin'' ORDER BY cn')

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-01-08 : 00:04:29
see

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=181843

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -