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
  • 704,970
  • 168
  • 1,303
  • 1,425
Cef
  • 319
  • 1
  • 3
  • 21

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-MT
  • 2,919
  • 2
  • 3
  • 10