[Azure Active Directory b2c] authentication failed due to: jwt audience is invalid
See original GitHub issueWhen I use the sample, all steps refer to this document.https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-single-page-app-webapi?tabs=app-reg-ga
An error occurred when I called the public API after logging in with my B2C account.
{"name":"AzureAD: Bearer Strategy","hostname":"jerry7","pid":1968,"level":30,"msg":"authentication failed due to: jwt audience is invalid","time":"2020-07-31T09:30:39.544Z","v":0}
GET /hello 401 5196.990 ms - -
This is the configuration of my web api sample.
const clientID = "9fe10508-405d-4617-8dee-52bca87e202f"; // Application (client) ID of your API's application registration
const b2cDomainHost = "poadevadb2c.b2clogin.com";
const tenantId = "poadevadb2c.onmicrosoft.com"; // Alternatively, you can use your Directory (tenant) ID (a GUID)
const policyName = "B2C_1_dpoa-b2c";
I’m sure all my Azure configurations are correct, but I can’t figure out where the problem is.
Hope to get help, thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
asp.net web api - Azure AAD - The audience is invalid
"aud" value that is being generated for JWT token by azure is also controlled by "accessTokenAcceptedVersion" property in AD application ...
Read more >Active Directory Authenticate API Application using Token ...
I would like to pass this JWT token to API App and get authenticated. ... Bearer error="invalid_token", error_description="The audience ...
Read more >Azure AD Authentication 401 error "the audience is invalid ...
jQuery : Azure AD Authentication 401 error "the audience is invalid " AddAzureADBearer .Net Core Web Api [ Beautify Your Computer ...
Read more >invalid jwt audience when running the sample #293 - GitHub
authentication failed due to: In _validateResponse: jwt audience is invalid. expected: 000000004C1CEE64,spn:000000004C1CEE64 .
Read more >Azure AD Sign-in Error 50027 - Invalid JWT token
Invalid JWT token due to the following reasons: doesn't contain nonce claim, sub claim subject identifier mismatch duplicate claim in idToken claims ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I configured the application separately for the web api, but I did not use its client id correctly. thank you for your help
I should know where the error happened.