PC Review


Reply
Thread Tools Rate Thread

DirectoryServices : pb with property memberOf

 
 
BlackGoddess
Guest
Posts: n/a
 
      28th Jul 2004
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/de...m_asp__net.asp
GetGroups function

Thanks for help, and sorry for my bad english.


 
Reply With Quote
 
 
 
 
BlackGoddess
Guest
Posts: n/a
 
      28th Jul 2004
they belong to at least one group : domain users.
and most of "bad" users belong to 2 ou 3 groups.

"LEBRUN Thomas" <lebrun_thomas_at_hotmail.com> a écrit dans le message de
news4C583CF-E57B-4418-A738-(E-Mail Removed)...
> This means that some of your users does not belong to a group.
>
> --
> LEBRUN Thomas
> http://morpheus.developpez.com
>
>
> "BlackGoddess" wrote:
>
> > 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/de...m_asp__net.asp
> > GetGroups function
> >
> > Thanks for help, and sorry for my bad english.
> >
> >
> >



 
Reply With Quote
 
Marc Scheuner [MVP ADSI]
Guest
Posts: n/a
 
      28th Jul 2004
>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
 
Reply With Quote
 
BlackGoddess
Guest
Posts: n/a
 
      28th Jul 2004
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();

"Marc Scheuner [MVP ADSI]" <(E-Mail Removed)> a écrit dans le
message de news:(E-Mail Removed)...
> >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



 
Reply With Quote
 
BlackGoddess
Guest
Posts: n/a
 
      29th Jul 2004
"Une erreur d'opération s'est produite"

( An operation error occured )

"LEBRUN Thomas" <lebrun_thomas_at_hotmail.com> a écrit dans le message de
news:A989011A-2FA7-4BD4-995B-(E-Mail Removed)...

> What is the complete error message of the exception ?
>
> --
> LEBRUN Thomas
> http://morpheus.developpez.com
>
>



 
Reply With Quote
 
BlackGoddess
Guest
Posts: n/a
 
      29th Jul 2004
The problem is solved.
I was using a user account that had not enough privileges to access all
informations in the Active Directory.


 
Reply With Quote
 
BlackGoddess
Guest
Posts: n/a
 
      29th Jul 2004
Thanks for the help


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DirectoryServices and ObjectClass property Jeroen Microsoft C# .NET 4 22nd May 2007 05:20 PM
DirectoryServices Property Update Davie Microsoft Dot NET 1 5th Jul 2006 08:43 PM
DirectoryServices Update AD property Davie Microsoft ASP .NET 2 1st Jun 2006 08:24 AM
System.DirectoryServices ProxyAddresses property =?Utf-8?B?Qm9uaQ==?= Microsoft Dot NET Framework 2 20th Jul 2005 06:30 AM
Cannot Single out one Property using System.DirectoryServices =?Utf-8?B?bWJvd2Vyc294?= Microsoft Dot NET Framework 0 24th May 2005 02:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:20 PM.