I have been trying to Integrate Identity Server 4 with SPA application. I am able to Authorize the Application in API but after the authorization the User.Claims
User.Claims
Try this
var user = User.Claims.First(claim => claim.Type=="Name").Value();
I am not an expert , but I think this is how you should work with Claims instead of the older versions of Asp.Net where placing User sufficed