After referring to different questions in StackOverflow, and also following the accepted answer:
IHttpContextAccessor.HttpContext.User.Identity shows all null properties