I want to retrieve hire date of every user from Active directory. How can I achieve this? using c# ,share point 2013
Get hire Date for all users from Active directory
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Akshay PhadkeRank #161 · 14.6K reputationPosted Jun 20, 2016, 9:49 AM EDT
Madhav170 reputationPosted Jun 20, 2016, 7:43 PM EDT
using (var context = new PrincipalContext(ContextType.Domain, "yourdomain.com")) { using (var searcher = new PrincipalSearcher(new UserPrincipal(context))) { foreach (var result in searcher.FindAll()) { DirectoryEntry de = result.GetUnderlyingObject() as DirectoryEntry; Console.WriteLine("First Name: " + de.Properties["givenName"].Value); Console.WriteLine("Last Name : " + de.Properties["sn"].Value); Console.WriteLine("SAM account name : " + de.Properties["samAccountName"].Value); Console.WriteLine("User principal name: " + de.Properties["userPrincipalName"].Value); Console.WriteLine(); } } } Console.ReadLine(); i tried the above code but that is not working with the hire date and birthday column because these are non-mapped column. can you help me with that?