# Configuring scopes in Access Token Provided by Rules

**URL:** <https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399>\
**Category:** Get Help\
**Created:** [March 26, 2018, 6:57pm UTC](https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399 "2018-03-26T18:57:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous.coward](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@anonymous.coward](https://community.auth0.com/u/anonymous.coward)\
**Post date:** [March 26, 2018, 6:57pm UTC](https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399/1 "2018-03-26T18:57:54Z")

</div>

When I execute a rule in Auth0, there’s an available access token to make requests to the Auth0 management API. Looking through the scope of the token, it appears there’s only read:users and update:users is provided. Is there a way I can configure this token to have more scopes such as create:users, or will I have to create a new access token within the rule on every execution?

---

<div class="post-metadata">

**Author:** ![jerdog](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jerdog/32/11231_2.png) [@jerdog](https://community.auth0.com/u/jerdog)\
**Post date:** [March 26, 2018, 8:52pm UTC](https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399/2 "2018-03-26T20:52:44Z")

</div>

Judging by the following documentation, you should be able to do everything you’re wanting to:

> **[Access Tokens](https://auth0.com/docs/secure/tokens/access-tokens)**
>
> Describes how access tokens are used in token-based authentication to allow an application to access an API after a user successfully authenticates and authorizes access.

> **[Auth0 Rules](https://auth0.com/docs/customize/rules)**
>
> Learn about Rules and how you can use them to customize and extend Auth0's capabilities.

---

<div class="post-metadata">

**Author:** ![anonymous.coward](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@anonymous.coward](https://community.auth0.com/u/anonymous.coward)\
**Post date:** [March 27, 2018, 4:03pm UTC](https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399/3 "2018-03-27T16:03:07Z")

</div>

Looking both articles I wasn’t able to find the specific information I needed. Just to clarify, the Rules environment has an `auth0` object that contains an access token necessary to make API calls to Auth0, not set the scopes of the user in the context. In my case, I wanted to make a request to the management API to create a new (related) user, but the token given does not have the necessary scopes to do so.

Is it a matter of making a request within the rule to the `/oauth/token` endpoint and use it for subsequent requests to create the user, or is there a way I can configure the `auth0` object in the rule to have the necessary scopes to begin with?

---

<div class="post-metadata">

**Author:** ![ramunas](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ramunas/32/12602_2.png) [@ramunas](https://community.auth0.com/u/ramunas)\
**Post date:** [April 24, 2019, 2:40pm UTC](https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399/4 "2019-04-24T14:40:24Z")

</div>

I am looking for the same answer.

---

<div class="post-metadata">

**Author:** ![harmoN](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/harmon/32/12826_2.png) [@harmoN](https://community.auth0.com/u/harmoN)\
**Post date:** [April 24, 2019, 5:47pm UTC](https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399/5 "2019-04-24T17:47:54Z")

</div>

To perform actions against the management API from within a rule with scopes not included with the provided token requires doing a client credentials grant from within the rule to get a new token with the necessary scopes.

> **[Use the Management API from within Rules](https://auth0.com/docs/customize/rules/use-management-api)**
>
> Learn how to use the Management API from within rules.

---

<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:** [September 2, 2019, 12:49pm UTC](https://community.auth0.com/t/configuring-scopes-in-access-token-provided-by-rules/10399/6 "2019-09-02T12:49:34Z")

</div>

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