# Guidance on Storing Temporary User Data (e.g., First Name) Only for Active Sessions

**URL:** <https://community.auth0.com/t/guidance-on-storing-temporary-user-data-e-g-first-name-only-for-active-sessions/194763>\
**Category:** Get Help\
**Tags:** user-search, user-management\
**Created:** [November 21, 2025, 10:30am UTC](https://community.auth0.com/t/guidance-on-storing-temporary-user-data-e-g-first-name-only-for-active-sessions/194763 "2025-11-21T10:30:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikas.viswanathan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vikas.viswanathan/32/71837_2.png) [@vikas.viswanathan](https://community.auth0.com/u/vikas.viswanathan)\
**Post date:** [November 21, 2025, 10:30am UTC](https://community.auth0.com/t/guidance-on-storing-temporary-user-data-e-g-first-name-only-for-active-sessions/194763/1 "2025-11-21T10:30:35Z")

</div>

’m reaching out for guidance on the best way to store certain pieces of user information—specifically a user’s first name —in Auth0 **only for the duration of the user’s active session**.

I am using a SAML connection and get the first name from the Idp onto Auth0. I have 3 applications connected to Auth0, I need to pass it as claims to all the application (maybe multiple times)

We would prefer not to persist this information in Auth0 user profiles after the session ends. Essentially, we’d like to:

- Store a user’s first name temporarily while their session is active.

- Automatically remove or avoid persisting this data once the user’s session is terminated or expires.

Could you advise on the recommended approach to achieve this functionality?  
For example:

- Are there Auth0 features (e.g., actions, rules, hooks, token enrichment, session storage options) that support temporary, non-persistent data?

---

<div class="post-metadata">

**Author:** ![teodor.andrei](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teodor.andrei/32/75320_2.png) [@teodor.andrei](https://community.auth0.com/u/teodor.andrei)\
**Post date:** [November 25, 2025, 4:09pm UTC](https://community.auth0.com/t/guidance-on-storing-temporary-user-data-e-g-first-name-only-for-active-sessions/194763/3 "2025-11-25T16:09:01Z")

</div>

Hi @vikas.viswanathan, and thank you for the question!

The recommended approach to this use case is to write an Action that adds Custom Claims to either ID or Access Tokens using the **setCustomClaims** method. Here is an example:

```auto
  api.accessToken.setCustomClaim('myClaim', 'this is a private, non namespaced claim');

```

More info on our Doc page [here](https://auth0.com/docs/secure/tokens/json-web-tokens/create-custom-claims). I hope this solves your use case.

Have a great day!  
Teodor.

---

<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:** [December 9, 2025, 4:09pm UTC](https://community.auth0.com/t/guidance-on-storing-temporary-user-data-e-g-first-name-only-for-active-sessions/194763/4 "2025-12-09T16:09:18Z")

</div>

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