DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Thu, 23 Aug 2007 04:54:18 -0700,    posted on: microsoft.public.dotnet.languages.csharp        back       

Thread Index
  1    Pete Wittig
          2    Pete Wittig


Active Directory Properties not loading....   
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
Date:Thu, 23 Aug 2007 04:54:18 -0700   Author:  

RE: Active Directory Properties not loading....   
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.

"Pete Wittig" wrote:


> 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
Date:Thu, 23 Aug 2007 06:26:02 -0700   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us