MicroDev
MicroDev

Reputation: 51

Angular / .net core 3.1 Get Role Claim from JWT

i have this Claims inside my token but Role Claim its a URL Like this

http://schemas.microsoft.com/ws/2008/06/identity/claims/role

how can i get the value of role from this URL(in blue) in TypeScript

enter image description here

Upvotes: 0

Views: 1178

Answers (1)

Serge
Serge

Reputation: 43860

if your claims are in a Json object you can use this syntax:

var role = myobject["schemas.xmlsoap.org/ws/2008/06/identity/claims/role"];

Upvotes: 1

Related Questions