I'm trying to add a feature in my C# app that looks up the email address associated with the Windows login, but I can not find anything on this!
The closest thing I found was it being listed in the Registry @ "HKEY_CURRENT_USER\Software\Microsoft\IdentityCRL" for one person, but not on any of my machines.
I've also tried "System.DirectoryServices.AccountManagement.UserPrincipal.Current.EmailAddress" but it returns nothing.
Has anyone ever had to look this up programmatically before? If so, any advice?