In my asp.net project I need to Access Active Directory to get E-mail id of Employees. What’re the steps to access it?? I got C# class to retreive those datas,but I don’t know what to do with that…
I found my ADC server name using “nslookup
set type=all
_ldap._tcp.dc._msdcs.DOMAIN_NAME” command. please help me by giving some information or links
Thanks,
You can access the information you need with System.DirectoryServices.AccountManagement-Namespace.
There is the class UserPrincipal, which has a static FindById-Method.
You will need an PrincipalContext to query you AD. To connect to the “current”-AD you can use the Domain-Class