# Use a variable value in multiple actions

**URL:** <https://community.auth0.com/t/use-a-variable-value-in-multiple-actions/181749>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [February 8, 2025, 7:37pm UTC](https://community.auth0.com/t/use-a-variable-value-in-multiple-actions/181749 "2025-02-08T19:37:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RandomPerson](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/randomperson/32/71335_2.png) [@RandomPerson](https://community.auth0.com/u/RandomPerson)\
**Post date:** [February 8, 2025, 7:37pm UTC](https://community.auth0.com/t/use-a-variable-value-in-multiple-actions/181749/1 "2025-02-08T19:37:12Z")

</div>

I have multiple auth0 actions running in my tenant. In one action , there are many lines of code being executing to update a variable. Need to use that variable value in another action. How can i achieve this ? I tried using api.cache but since caching is not transaction specific, it is a risk to use in case of simultaneous logins. Is it possible to set claim in token in one action then log the api.idToken to see the value in it but doesnt work

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [February 11, 2025, 1:20pm UTC](https://community.auth0.com/t/use-a-variable-value-in-multiple-actions/181749/3 "2025-02-11T13:20:10Z")

</div>

Hi @RandomPerson

Welcome back to the Auth0 Community!

Thank you for posting your question. Unfortunately, actions currently do not support global objects, so caching is the only way to store and retrieve data that persists in executions.

Thanks  
Dawid

---

<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 25, 2025, 1:21pm UTC](https://community.auth0.com/t/use-a-variable-value-in-multiple-actions/181749/4 "2025-02-25T13:21:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [August 29, 2025, 5:12pm UTC](https://community.auth0.com/t/use-a-variable-value-in-multiple-actions/181749/6 "2025-08-29T17:12:16Z")

</div>

#### Hi everyone! 👋

**Actions Transaction Metadata** is now in **EA**. It lets you pass small key–value data **between multiple post-login Actions during a single authentication transaction.**

_How it works:_ set with `api.transaction.setMetadata([`key`], [`value`])`, then read via `event.transaction.metadata.key` later in the **same** login flow.

- You can read more about that feature from our docs → **Docs:** [auth0.com/docs/customize/actions/transaction-metadata](http://auth0.com/docs/customize/actions/transaction-metadata)

_ **NOTE:** _ _Transaction metadata is only available during the current authentication transaction and is not persisted beyond the completion of the authentication flow. This feature is only currently available on_ `post-login` _Actions._

Thanks!  
Dawid
