# Rate limit for Auth0 management requests in actions

**URL:** <https://community.auth0.com/t/rate-limit-for-auth0-management-requests-in-actions/151427>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [November 13, 2024, 1:33pm UTC](https://community.auth0.com/t/rate-limit-for-auth0-management-requests-in-actions/151427 "2024-11-13T13:33:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ondrej1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ondrej1/32/61981_2.png) [@ondrej1](https://community.auth0.com/u/ondrej1)\
**Post date:** [November 13, 2024, 1:33pm UTC](https://community.auth0.com/t/rate-limit-for-auth0-management-requests-in-actions/151427/1 "2024-11-13T13:33:41Z")

</div>

Hi,  
I started migrate our Auth0 rules to actions and I am using nodejs package **auth0** inside actions to get user info / update user / get user by email and more.

```auto
const ManagementClient = require('auth0').ManagementClient;

```

and I read about rate limits for these calls under actions.

Can you please describe these limitations more? I read docs, but I am still not sure. Could it be problem if we do a lot of calls under actions?

Thank you.

---

<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:** [November 13, 2024, 4:52pm UTC](https://community.auth0.com/t/rate-limit-for-auth0-management-requests-in-actions/151427/3 "2024-11-13T16:52:26Z")

</div>

Hi @ondrej1,

Yes, it can definitely reach your rate limit if you perform excessive amounts of requests to the Management API. You can review your subscription limit in our [Rate Limit Configurations](https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/rate-limit-configurations) documentation.

To work around these limitations, we strongly recommend the [caching your Management API access tokens in your Action](https://community.auth0.com/t/caching-management-api-access-tokens-in-login-action/95855) script.

This way, you can avoid hitting the rate limit too quickly.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![ondrej1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ondrej1/32/61981_2.png) [@ondrej1](https://community.auth0.com/u/ondrej1)\
**Post date:** [November 14, 2024, 10:05am UTC](https://community.auth0.com/t/rate-limit-for-auth0-management-requests-in-actions/151427/4 "2024-11-14T10:05:25Z")

</div>

Hi [rueben.tiow](https://community.auth0.com/u/rueben.tiow),

Thank you for your response. I checked shared auth0 code for cache Auth0 access token. I found from with latest version of auth0 (4.13.0). There is no more function `management.getAccessToken()` so then the code is not possible to run with latest version. I needed downgrade to version **3.7.2** (not ideal).

Is there a way how to get accessToken with latest version 4.13.0?

And also I found cache limitation to 4kB for single key and accessToken could be more. How to deal with it?

Thank you.

---

<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:** [November 15, 2024, 4:55pm UTC](https://community.auth0.com/t/rate-limit-for-auth0-management-requests-in-actions/151427/5 "2024-11-15T16:55:46Z")

</div>

Hi @ondrej1,

I have tested this and confirmed that the `management.getAccessToken()` has been removed in the latest version of Auth 4.13.0.

Moving forward, you could also use the [client credentials grant](https://auth0.com/docs/authorization/flows/call-your-api-using-the-client-credentials-flow) to make a post request (Axios, for example) to get the access token while still using the latest version.

And yes, cache items have a maximum size of 4kB with an accumulative size of the cache keys not exceeding 8kB. This is mentioned in our [Actions Limitations](https://auth0.com/docs/customize/actions/limitations#cached-data-) documentation.

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:** [November 29, 2024, 4:56pm UTC](https://community.auth0.com/t/rate-limit-for-auth0-management-requests-in-actions/151427/6 "2024-11-29T16:56:24Z")

</div>

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