# Cannot use Management API to set tenant session lifetimes in minutes

**URL:** <https://community.auth0.com/t/cannot-use-management-api-to-set-tenant-session-lifetimes-in-minutes/124193>\
**Category:** Get Help\
**Tags:** tenants, management-api\
**Created:** [January 4, 2024, 8:27pm UTC](https://community.auth0.com/t/cannot-use-management-api-to-set-tenant-session-lifetimes-in-minutes/124193 "2024-01-04T20:27:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.federico](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael.federico/32/48770_2.png) [@michael.federico](https://community.auth0.com/u/michael.federico)\
**Post date:** [January 4, 2024, 8:27pm UTC](https://community.auth0.com/t/cannot-use-management-api-to-set-tenant-session-lifetimes-in-minutes/124193/1 "2024-01-04T20:27:03Z")

</div>

I have configured my tenant to have the below session lifetime values (eg. both set to 15 minutes) from the the Dashboard.

idle\_session\_lifetime=15  
session\_lifetime=15

I am now trying to update the tenant using the Management API, and I find that the integer value is accepted as HOURS and not minutes. Further, since this is validated as an INTEGER, it is not possible to set a value that is less than a full hour, or that is not a multiple of 60 minutes.

I have read the below closed topic, but the post seems to be innaccurate - the issue is not simply an inconsistency as stated there, but actually a shortcoming of the management API where it is not possible to use it to update a tenant unless that tenant has session lifetime values in exact multiples of 60 minutes.

[https://community.auth0.com/t/inactivity-timeout-and-require-login-after-tenant-settings-look-incorrect/113800](https://community.auth0.com/t/inactivity-timeout-and-require-login-after-tenant-settings-look-incorrect/113800)

Can you please clarify if there is a way to use the tenant API to set a 15 minute value, for instance?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 4, 2024, 11:28pm UTC](https://community.auth0.com/t/cannot-use-management-api-to-set-tenant-session-lifetimes-in-minutes/124193/4 "2024-01-04T23:28:38Z")

</div>

Hey there @michael.federico welcome to the community!

Thanks for pointing this out - I am not positive of the expected behavior here but I’ve reached out internally and will certainly let you know when I have more information myself 🙂

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [January 19, 2024, 1:59am UTC](https://community.auth0.com/t/cannot-use-management-api-to-set-tenant-session-lifetimes-in-minutes/124193/5 "2024-01-19T01:59:20Z")

</div>

Hey @michael.federico just a quick follow up on this one.

While not documented, there is a workaround using `idle_session_lifetime_in_minutes` and `session_lifetime_in_minutes` which will allow you to set these values to 15 minutes for example.

---

<div class="post-metadata">

**Author:** ![michael.federico](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/michael.federico/32/48770_2.png) [@michael.federico](https://community.auth0.com/u/michael.federico)\
**Post date:** [January 23, 2024, 3:58pm UTC](https://community.auth0.com/t/cannot-use-management-api-to-set-tenant-session-lifetimes-in-minutes/124193/6 "2024-01-23T15:58:42Z")

</div>

Thanks, I will give it a shot. However, I am using the Java SDK for management api and I do not see any code here for these ‘secret’ properties. Do you know if there is a way to set these using the SDK?

---

<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:** [February 6, 2024, 3:59pm UTC](https://community.auth0.com/t/cannot-use-management-api-to-set-tenant-session-lifetimes-in-minutes/124193/7 "2024-02-06T15:59:05Z")

</div>

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