Code created from Manually validating a JWT using .NET by Jerrie Pelser
The input for the Validate()
function are the clientId and tenantId as explained by MSAL which are re-labelled auth0Audience and auth0domain respectively.
The rawIdToken is from the idToken of the accountIdentifier
object returned by MSAL for JavaScript.