Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / August 2005

Tip: Looking for answers? Try searching our database.

Get the user email

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tangolp - 26 Aug 2005 00:18 GMT
I'm building a windows application in csharp and I'd like to know if there is
a way to filter the search by the user email address in AD?  Thanks!
Joe Kaplan (MVP - ADSI) - 26 Aug 2005 02:11 GMT
The filter would look like:

(mail=user@domain.com)

This assumes you want to find the user by their email address.  If you want
to find the user's email address and know the login name or something, the
filter would be different.

Joe K.

> I'm building a windows application in csharp and I'd like to know if there
> is
> a way to filter the search by the user email address in AD?  Thanks!
tangolp - 26 Aug 2005 18:03 GMT
Thank you Joe for your reply.

Is it possible to get the user AD information like groups, first name, last
name, etc.. by passing only the user id?  Or I need user id and password?  
Any code sample would be helpful.  Thanks.

> The filter would look like:
>
[quoted text clipped - 9 lines]
> > is
> > a way to filter the search by the user email address in AD?  Thanks!
Joe Kaplan (MVP - ADSI) - 26 Aug 2005 18:19 GMT
It is possible to search for the user in AD given only their username and
you can get all of this information (although groups can be tricky).

However, you need a security context that has rights to access AD.  If you
want to access AD using the user's own security context, you either need
their plain text credentials or a Windows security token that you can use to
impersonate them and access AD.  If you want to use a different account to
access AD, then any valid service account that has the rights you need will
do.

So, it depends on what your model for accessing AD is.

There are lots of code samples in the System.DirectoryServices SDK topic in
MSDN.

Joe K.

> Thank you Joe for your reply.
>
[quoted text clipped - 19 lines]
>> > is
>> > a way to filter the search by the user email address in AD?  Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.