Net core application. Through swagger I am authenticating against my web api app. I am sending JWT token in each request from swagger. This jwt token contains Azure user objectid. I want to retrieve it. I tried as below.
userId = _httpContextAccessor.HttpContext.User.Claims.First(i => i.Type == ClaimTypes.NameIdentifier).Value;
this is not giving me correct object identifier. I can see object identifier in my token as showed below.
In below image there is object identifier but I am not able to retrieve it. Can someone help me on this? Any help would be appreciated. Thanks