DirectoryServices : pb with property memberOf

  • Thread starter Thread starter BlackGoddess
  • Start date Start date
B

BlackGoddess

Hi,

With the framework 1.1, I tried to read some informations about user
accounts in ActiveDirectory.
For some accounts, the property "memberOf" is available, and for some others
not ... I didn't see any difference (except names) between the accounts ...
I tried to create a new account (with the managment console), and the
property "memberOf" is not available...

I tried to read it with the MSDN's sample :

http://msdn.microsoft.com/library/d...ve_directory_authentication_from_asp__net.asp
GetGroups function

Thanks for help, and sorry for my bad english.
 
they belong to at least one group : domain users.
and most of "bad" users belong to 2 ou 3 groups.
 
they belong to at least one group : domain users.
and most of "bad" users belong to 2 ou 3 groups

Yes, but the "Domain Users" is the so-called "Primary Group", which
will NEVER show up in the "memberOf" attribute!

To get a hold of that group membership, you'll need to look at the
group SID's in the "tokenGroups" attribute of the user.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
When I add

search.PropertiesToLoad.Add("tokenGroups");

to the msdn sample, i become an exception :

System.Runtime.InteropServices.COMException
at the line :
SearchResult result = search.FindOne();
 
The problem is solved.
I was using a user account that had not enough privileges to access all
informations in the Active Directory.
 
Back
Top