Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: Fri, 11 Jul 2008 00:14:37 -0700 (PDT),    group: microsoft.public.platformsdk.active.directory        back       


i need to get email id,group id in Direcotry Searcher   
i am unable to get email , group name is it such hectic but for geting
name,account name ,cn..etc i am able to fetch
please go through
 DirectorySearcher search = new DirectorySearcher(entry,
"(&(objectCategory=person)(objectClass=user))");

 SortOption sort = new SortOption(property, SortDirection.Ascending);
     search.Sort = sort;


foreach (SearchResult result in search.FindAll())
            {

               Console.WriteLine("Account name = {0}",
result.Properties[property][0]);
               Console.WriteLine("user name = {0}",
result.Properties["name"][0]);

            }
date: Fri, 11 Jul 2008 00:14:37 -0700 (PDT)   author:   unknown

Re: i need to get email id,group id in Direcotry Searcher   
I'm sorry, but your English doesn't quite make sense.

If you want to retrieve the email address, the attribute is "mail".  The 
Windows account name is "sAMAccountName".

Group membership is much more complicated than that.  You can look at 
memberOf for a first approximation, but that does not include nested groups 
or primary group.

Joe K.
-- 
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
 wrote in message 
news:4e2884de-a05a-47c6-9e6d-7a69e0bb0caf@d77g2000hsb.googlegroups.com...
>i am unable to get email , group name is it such hectic but for geting
> name,account name ,cn..etc i am able to fetch
> please go through
> DirectorySearcher search = new DirectorySearcher(entry,
> "(&(objectCategory=person)(objectClass=user))");
>
> SortOption sort = new SortOption(property, SortDirection.Ascending);
>     search.Sort = sort;
>
>
> foreach (SearchResult result in search.FindAll())
>            {
>
>               Console.WriteLine("Account name = {0}",
> result.Properties[property][0]);
>               Console.WriteLine("user name = {0}",
> result.Properties["name"][0]);
>
>            }
date: Fri, 11 Jul 2008 12:28:42 -0500   author:   Joe Kaplan

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us