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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 get member from AD Group
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kdeutsch
Yak Posting Veteran

USA
83 Posts

Posted - 01/07/2013 :  15:31:32  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 01/08/2013 :  00:04:29  Show Profile  Reply with Quote
see

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

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

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000