I would like to get the Manager Email field from the AD My code is as follows:
Getting Manager E-Mail Id from AD Based on login User
////Get the username and domain information
string userName = Environment.UserName;
string domainName = Environment.UserDomainName;
List
PrincipalContext domainContext = new PrincipalContext(ContextType.Domain, domainName);
UserPrincipal user = UserPrincipal.FindByIdentity(domainContext, userName);
I can retrived besic users attributes from AD but not manager email id field
Please help me
Thanks

mohan raj55 reputationPosted Jul 11, 2013, 9:43 PM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 11, 2013, 10:03 PM EDT
Try this
Regards,
Iftikar