Solved

Unable to find all members in Active Directory groups

Posted on 2010-08-18
3
519 Views
Last Modified: 2013-12-24
I am writing a VB.Net application that lists all the groups (190+) and their corresponding members from our OU and its subOUs.  However, after trying VB.Net DirectorySearcher and an additional 4-6 different vbscripts I am incurring the same problem.  I have a group (sqlServer) that is showng to be empty, even though it has a user acount (userSQL) if I check it manually.  The subOU that holds sqlServer has another two groups, sqlAgent and sqlText, that both have userSQL as their only member and the scripts list userSQL.  I do not understand why userSQL is listed for the first 2 groups and not the third.  I have manually checked 30+ groups and this is the only anomaly so far.  I didn't post any code since it is happening with 6 different scripts.  Thanks.

P.S. I woud prefer to not remove/insert the user because of that group's function.
0
Comment
Question by:tosmserversupport
3 Comments
 
LVL 70

Accepted Solution

by:
Chris Dent earned 500 total points
Comment Utility
Hello,

The simplest explanation would be that userSQL's Primary Group is set to sqlServer. The Primary Group isn't part of the memberOf / member combination and is instead matched by the primaryGroupID and primaryGroupToken attributes.

It should be pretty easy to see in the user properties.

HTH

Chris
0
 
LVL 14

Expert Comment

by:Shabarinath Ramadasan
Comment Utility
What is the scope of the group? Global or Domain Local or Universal?

Also, try this powershell and see the result.

Get-QADGroupMember -Identity "groupname"

To give more suggestion, please share the ldap filter you are using inside the code.

Good Luck
Shaba
0
 

Author Comment

by:tosmserversupport
Comment Utility
Chris,

You are correct that sqlServer is userSQL's primary group.  I'm going to look into this more.  Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Script is being strange 8 47
ADMT Intra Forest migration questions 7 66
report returning null 21 49
SQL anywhere 11 databases 1 27
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now