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
Iftikar HussainPosted Jul 12, 2013, 2:03 AM
Try this
Regards,
Iftikar
mohan rajPosted Jul 12, 2013, 1:43 AM