0

My site is using Azure AD for authentication I see that User.Identity.Name is available and I was wondering if the Guid uid is available in a similar fashion?

Thanks

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Cef
  • 661
  • 1
  • 6
  • 26

1 Answers1

0

One of the workaround could able to get the current user id from ASP.NET core MVC application.

We need to use the below :

using Microsoft.AspNet.Identity;

Instead of using User.Identity.Name use this cmd User.Identity.GetUserId();

For more information please refer this SO THREAD

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15