4,815 questions
Email/First Name and Last Name in ASP.Net Core Controller Side

Shatrughan Raghuwanshi
1
Reputation point
I am trying to get the E-Mail/First Name and Last Name on the Controller side of ASP.Net Web
User Name i am getting via
string UserName = HttpContext.User.Identity.Name;
But i am getting NULL in
MailId = UserPrincipal.Current.EmailAddress;
FirstName = UserPrincipal.Current.GivenName;
LastName = UserPrincipal.Current.Surname;
Unfortunately our LDAP server is not providing the Mail Address
Developer technologies ASP.NET ASP.NET Core
Sign in to answer