Solution skill
Auth0 Bad audience error
Complete solution
Shows how to fix auth0 Bad audience error. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
One, to call the Management API you have to use the Management API audience, not a custom API audience you created in the dashboard. Two, when granting scopes, the correct name is update:usersappmetadata, not update:users or update:users_metadata.
Steps
- Two things to check on a Bad audience error with node-auth0. One, to call the Management API you have to use the Management API audience, not a custom API audience you created in the dashboard. Two, when granting scopes, the correct name is update:usersappmetadata, not update:users or update:users_metadata. Check the Permissions tab of your API in the dashboard for the full list of valid scopes.
- Source: https://github.com/auth0/node-auth0/issues/787 (Auth0)
When to use
You are seeing this: Two things to check on a Bad audience error with node-auth0. Use this skill when you run into "Auth0 Bad audience error".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://github.com/auth0/node-auth0/issues/787
Evidence
In gh:auth0/node-auth0#787, the issue was: <!-- Please do not report security vulnerabilities here. The Responsible Disclosure Program (https://auth0.com/whitehat) details the procedure for disclosing security issues. Thank you in advance for helping us to improve this library! Please read through the template below and answer all relevant questions. Your additional work here is greatly appreciated and will help us respond as quickly as possible. For general support or usage questions, use the Auth0 Community (https://community.auth0.com/) or Auth0 Support (https://support.auth0.com/).. The verified answer: Two things to check on a Bad audience error with node-auth0. One, to call the Management API you have to use the Management API audience, not a custom API audience you created in the dashboard. Two, when granting scopes, the correct name is update:usersappmetadata, not update:users or update:users_metadata.. Issue URL: https://github.com/auth0/node-auth0/issues/787
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_bxMBsCW5Mbr9G-lw2cQWkA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Auth0 Bad audience error <span>— Vectle</span></a>