Please start any new threads on our new site at 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
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  

Yak Posting Veteran

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')

Very Important crosS Applying yaK Herder

52326 Posts

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

SQL Server MVP

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.02 seconds. Powered By: Snitz Forums 2000