How can I access the current AEM session expiry time? | Community
Skip to main content
Level 2
June 25, 2025
Question

How can I access the current AEM session expiry time?

  • June 25, 2025
  • 3 replies
  • 707 views
Hi All,
I'm currently working on a use case where I need to retrieve the token expiry time for the current user in AEM. Based on my understanding, this information is stored at the path: /home/users//.tokens/ (specifically, the rep:token.exp property).
This works as expected in the Author and RDE environments. However, on the AEM as a Cloud Publisher instance(dev/stage/prod), I don’t see this node at all—it appears that the .tokens node is either hidden or not accessible in this environment.
Has anyone come across this issue or identified an alternative approach to retrieve the token expiry (rep:token.exp) or determine the current user session expiry on the Publisher?
Any insights or suggestions would be greatly appreciated.

3 replies

Nitesh-Chavan
Level 3
June 26, 2025

Hi @sku4 

Good Day!

First of all let me know is your Publisher Instance accessible to other users (other than admin), have you created users in Publisher environment as well..?
If that is the case then you can find the tokens stored under the /home/users folder. 

Ideally we do not create a users for the Publisher environments. 

Nitesh-Chavan
Level 3
June 26, 2025

If you want to check the same, try creating a dummy user in the Dev environment Publisher instance and login via a other browser, you will be able to see the tokens for the user under /home/users in Publisher as well. 

Basically if no user exists in the pub instance then there will not be any data under the /home/users except for the admin.  

Sku4Author
Level 2
June 26, 2025

Hi @nitesh-chavan , Thank you for the response,

I do not see tokens node for any user in publisher. I could see only in local/RDE, but not in Dev/Stage/Prod. I tried printing token node path, it says node does not exists. 

Nitesh-Chavan
Level 3
July 2, 2025

I hope you are logging in with Admin credentials while doing this activity, if not please login with Admin credentials. May I know how you are printing token node paths? What approach you are using for it. 

kautuk_sahni
Community Manager
Community Manager
July 9, 2025

@sku4 Just checking in — were you able to resolve your issue?
We’d love to hear how things worked out. If the suggestions above helped, marking a response as correct can guide others with similar questions. And if you found another solution, feel free to share it — your insights could really benefit the community. Thanks again for being part of the conversation!

Kautuk Sahni