Use an LDAP search.
Here's the RFC:
http://www.faqs.org/rfcs/rfc2254.html
Here are a couple of articles on how to use it:
http://www.wwwcoder.com/main/parenti...8/default.aspx
http://www.codeproject.com/csharp/ADTester.asp
http://www.codeproject.com/aspnet/adsi1.asp
This one isn't as detailed:
http://www.codeproject.com/vb/net/LDAP_Using_VBnet.asp
Just remember that your logical operators for the filter are in prefix
notation. A search would go something like (&(CN='Dog')(Name='Yada'))
for AND operations, (|...) for OR operations.
The particular AD property that has the user name, I've found, is
sAMAccountName. This may or may not be the same for you. You'll have
to split off the domain name in any case.
Dan Nash wrote:
> Hi
>
> I've got the Username of the logged in user and domain with
> Page.User.Identity.Name. It comes in as "domain\user".
>
> Now, I want to query AD to get the users Firstname and Email address. Can
> anyone point me in the direction of an article?
>
> Cheers
>
>
> Dan