Created
January 25, 2024 17:29
-
-
Save skarllot/5acf6ec9a2c4e1840bb8fe04210d0875 to your computer and use it in GitHub Desktop.
Get current Azure logged user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Claim displayName = ClaimsPrincipal.Current.FindFirst(ClaimsPrincipal.Current.Identities.First().NameClaimType); | |
ViewBag.DisplayName = displayName != null ? displayName.Value : string.Empty; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment