Sunday, June 21, 2020

Azure AD authentication token format

Temporary authentication tokens generated when a user tries to log in using azure ad have the following format

{ "typ": "JWT", "alg": "RS256", "kid": "X5eXk4xyojNFum1kl2Ytv8dl..." }.{ "iss": "https://contoso0926tenant.b2clogin.com/c64a4f7d-3091-4c73-a7.../v2.0/", "exp": 1549651031, "nbf": 1549647431, "aud": "f2a76e08-93f2-4350-833c-965...", "oid": "1558f87f-452b-4757-bcd1-883...", "sub": "1558f87f-452b-4757-bcd1-883...", "name": "David", "tfp": "B2C_1_signupsignin1", "nonce": "anyRandomValue", "scp": "read", "azp": "38307aee-303c-4fff-8087-d8d2...", "ver": "1.0", "iat": 1549647431 }.[Signature]

More information about requesting the tokens can be found at https://docs.microsoft.com/en-us/azure/active-directory-b2c/access-tokens

No comments:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...