# How do I change M2M access\_token lifetime?

**URL:** <https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148>\
**Category:** Get Help\
**Tags:** sessions, access-token\
**Created:** [March 19, 2025, 7:11pm UTC](https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148 "2025-03-19T19:11:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave.natalie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dave.natalie/32/60163_2.png) [@dave.natalie](https://community.auth0.com/u/dave.natalie)\
**Post date:** [March 19, 2025, 7:11pm UTC](https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148/1 "2025-03-19T19:11:53Z")

</div>

Ready to post? 🔍 First, try searching for your answer.  
When I obtain a new access\_token using the Client Credentials flow, the expiry time is always set to one hour. (3600 seconds). Ideally, I would want these tokens to be valid for longer.

I see docs that mention you can change `Token Expiration (Seconds)` and `Token Expiration For Browser Flows (Seconds)` in API settings, however, the settings page for my API only shows `Maximum Access Token Lifetime`, and `Implicit/Hybrid Flow Access Token Lifetime`.

My maximum lifetime is set to 86400 seconds, and implicit/hybrid is set to 7200 seconds.

Why are my JWTs only valid for one hour? Where is the 3600 value set? How can I change it to 24 hours?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 19, 2025, 7:36pm UTC](https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148/3 "2025-03-19T19:36:32Z")

</div>

Hi @dave.natalie

Welcome back to the Auth0 Community!

I believe the Token Expiration setting you are talking about is the one available through the M2M application created in your Auth0 Dashboard. The token expiration time of 3600 are set by default for applications which appears to override the tokens provided by the API.

If you go to your M2M application’s setting you should see the following:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/6/7/677dec8cf43852788ab43a5e782385df8ab7593f.png)

If you have any other questions or need further assistance on the matter, feel free to leave a reply!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![dave.natalie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dave.natalie/32/60163_2.png) [@dave.natalie](https://community.auth0.com/u/dave.natalie)\
**Post date:** [March 19, 2025, 7:43pm UTC](https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148/4 "2025-03-19T19:43:39Z")

</div>

Thanks for the response!

I don’t understand why the lifetime of the ID token would affect the lifetime of the access token, but that being said, I can see that the value in my application settings is in-fact set to 36000 seconds (10 hours), but the `exp` value token in my access\_token is 3600 seconds. (1 hour).

Here is a screenshot from the .Net debugger that shows the value I am receiving from Auth0.

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

I can’t find “3600” anywhere in any settings.

Edit: To clarify, my `iat` and `exp` are 3600 seconds apart. The `exp` itself is not “3600”.

```auto
{
 "iat": 1742409396, // (March 19, 2025 6:36:36 PM UTC)
 "exp": 1742412996, //(March 19, 2025 7:36:36 PM UTC)
}

```

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 19, 2025, 7:51pm UTC](https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148/5 "2025-03-19T19:51:42Z")

</div>

Hi again

Sorry, I must have misread something in your post and made myself believe you were referring to the ID Token, It has been a long day! 😅

Thanks for providing me the screenshot, I will investigate some more regarding the matter. Do you mind sharing via a DM the tenant name on which you have this issue on so I can take a look around?

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 19, 2025, 9:55pm UTC](https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148/6 "2025-03-19T21:55:22Z")

</div>

Following up with our private conversation regarding the matter.

I have proposed to use the following cURL command in order to investigate what is the token expiration returned by the response:

```auto
curl --request POST \
  --url 'https://{{AUTH)_DOMAIN))' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials \
  --data client_id=YOUR_CLIENT_ID \
  --data client_secret=YOUR_CLIENT_SECRET \
  --data audience=YOUR_API_IDENTIFIER

```

As you have confirmed that making the cURL request and also another call returned from your PostMan application, the token expiration returned matched the one set via the Auth0 Dashboard.

I have identified an action where you set a token inside the cache which could affect the value returned by your application however that is unlikely.

As you have stated, the issue might reside inside a library used in your application called `IdentityModel.Client` which might modify or replace the actual lifetime set by the dashboard. I will be posting the screenshot you have shared with me for reference so that anybody else can take a look at it:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/3/8/38e14cdd11ac85142f7c0ca94164ce1d130502b2.png)  
( if you want to have this screenshot removed, let me know! )

Whenever you identify the issue within the application which would modify the lifetime of the token, feel free to share it with the rest of the community!

Otherwise, if you have any other questions, just leave a reply or post again on the community referencing to this post!

Kind Regards,  
Nik

---

<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:** [April 2, 2025, 9:56pm UTC](https://community.auth0.com/t/how-do-i-change-m2m-access-token-lifetime/184148/7 "2025-04-02T21:56:14Z")

</div>

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