# Issue with getting allowed scopes in token

**URL:** <https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [September 28, 2024, 5:29pm UTC](https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196 "2024-09-28T17:29:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaydenmiller1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kaydenmiller1/32/60847_2.png) [@kaydenmiller1](https://community.auth0.com/u/kaydenmiller1)\
**Post date:** [September 28, 2024, 5:29pm UTC](https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196/1 "2024-09-28T17:29:20Z")

</div>

I am having an issue where when I request a token using OAuth from Postman, the Auth0 Authentication API Debugger, or my own application it will not return the scopes that I request except for standard OIDC/profile ones like `profile`, `email`, `offline_access`.

- I have confirmed that I am sending the request with my audience (`https://<domain>/oauth/token?audience=https%3A%2F%2Fapi.projekter.opsella.com`)
- The API has RBAC enabled.
- I have also ensured that the users show that they have been assigned permissions, either via role or direct assignment.
- I’m not using any actions/triggers or any of the (deprecated) rules/hooks.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/4/0/403423b45c0ce178cde12f11fa6ec6a6100450cc.png)

I am attempting to use the Auth0 organization feature, so maybe there is some config there that I am missing? I’m pretty confident that I have my request setup correctly in postman though I could be wrong. I’m not sure what I’m missing here that would be causing this issue. This was working about a week ago and then while I was doing my development I cleaned up some of the organizations and recreated them and now the scopes stopped showing up.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/9/9/9924307b586fc1c01a1f1b373f73b3a4436ca026.png)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 30, 2024, 6:04pm UTC](https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196/3 "2024-09-30T18:04:52Z")

</div>

Hi @kaydenmiller1,

Welcome to the Auth0 Community!

You should be able to get your requested scopes if the login request included your **audience**.

The organization feature should not interfere with the scopes returned from exchanging a code for an access token.

I recommend reviewing our [Call Your API Using the Authorization Code Flow with PKCE](https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce/call-your-api-using-the-authorization-code-flow-with-pkce) documentation as an extra resource.

If you continue having issues, please send me a direct message with your tenant’s name. I can look into this further for you.

Cheers,  
Rueben

---

<div class="post-metadata">

**Author:** ![kaydenmiller1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kaydenmiller1/32/60847_2.png) [@kaydenmiller1](https://community.auth0.com/u/kaydenmiller1)\
**Post date:** [October 1, 2024, 7:34pm UTC](https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196/4 "2024-10-01T19:34:47Z")

</div>

I have sent you a message as like I mentioned above, I have already included the audience value in the request, and it does not return the expected permissions.

---

<div class="post-metadata">

**Author:** ![kaydenmiller1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kaydenmiller1/32/60847_2.png) [@kaydenmiller1](https://community.auth0.com/u/kaydenmiller1)\
**Post date:** [October 2, 2024, 5:37pm UTC](https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196/5 "2024-10-02T17:37:05Z")

</div>

I was able to fix the issue by disabling RBAC on the API, deleting all existing permissions and recreating them. A rather annoying bug but that seemed to fix it.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [October 3, 2024, 5:42pm UTC](https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196/6 "2024-10-03T17:42:11Z")

</div>

Hi @kaydenmiller1,

Thanks for the update!

I’m glad you could resolve the issue, although deleting and recreating all existing permissions caused more overhead.

Let us know if you have any other questions.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 17, 2024, 5:43pm UTC](https://community.auth0.com/t/issue-with-getting-allowed-scopes-in-token/148196/7 "2024-10-17T17:43:00Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
