Getting the email from external providers Google and Facebook during account association step in a default MVC5 app

PLEASE SEE UPDATES AT THE BOTTOM OF THIS POST! The following works for me for Facebook: StartupAuth.cs: var facebookAuthenticationOptions = new FacebookAuthenticationOptions() { AppId = “x”, AppSecret = “y” }; facebookAuthenticationOptions.Scope.Add(“email”); app.UseFacebookAuthentication(facebookAuthenticationOptions); ExternalLoginCallback method: var externalIdentity = HttpContext.GetOwinContext().Authentication.GetExternalIdentityAsync(DefaultAuthenticationTypes.ExternalCookie); var emailClaim = externalIdentity.Result.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Email); var email = emailClaim.Value; And for Google: StartupAuth.cs app.UseGoogleAuthentication(); … Read more