Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL syntax for querying AD group membership

Status
Not open for further replies.

medpcjockey

Technical User
Jan 24, 2007
11
0
0
US
I've established a connection to Active Directory through Crystal Reports. Now I need to write an SQL select statement to return all computer accounts and their group memberships. My statement returns all the computer accounts in the target OU, but the MemberOf field is empty. I've included below my query statement and would welcome any suggestions...
*******************************************
Select CN, memberOf
From 'LDAP://OU=Managed Accounts, OU=Central Valley Service Area, DC= root, DC=sutterhealth, DC=org'
where ObjectClass='computer'
*********************************************
 
....how is this related to SS Reporting Services ?

btw - I thought that "member of" field holds the security groups that users are part of. You are returning all the "computers" from AD. I am not that well up on AD but I thought that USERS were in GROUPS - COMPUTERS are in DOMAINS...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top