Active Directory Properties not loading....

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to determine of which groups a particular user is a member. I
am using the following code:

DirectorySearcher search = new DirectorySearcher();
search.Filter = String.Format("(SAMAccountName={0})", userName);
search.PropertiesToLoad.Add("memberOf");
SearchResult result = search.FindOne();

I get no errors for any user I try. The problem is certain users have the
"memberOf" property and others don't. However, when I look in AD, every user
I try has groups listed in the "Member Of" tab of the properties of that
user.

Any ideas why "memberOf" property would come through for some users and not
others?

Is there a setting in AD that might be causing the issue?

Thanks in advance,

-Pete
 
I found the problem. It was a security setting for particular users who
where created after we switched domains. Authenticated Users did not have
read permission on certain accounts.
 
Back
Top