# Dynatrace Managed Synthetic HTTP Tests with JWT Token Chaining

**URL:** <https://community.dynatrace.com/t/dynatrace-managed-synthetic-http-tests-with-jwt-token-chaining/55561>\
**Category:** Synthetic Monitoring\
**Tags:** synthetic-monitoring\
**Created:** [April 14, 2026, 1:40pm UTC](https://community.dynatrace.com/t/dynatrace-managed-synthetic-http-tests-with-jwt-token-chaining/55561 "2026-04-14T13:40:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GuyHalfon](https://avatars.discourse-cdn.com/v4/letter/g/f14d63/32.png) [@GuyHalfon](https://community.dynatrace.com/u/GuyHalfon)\
**Post date:** [April 14, 2026, 1:40pm UTC](https://community.dynatrace.com/t/dynatrace-managed-synthetic-http-tests-with-jwt-token-chaining/55561/1 "2026-04-14T13:40:58Z")

</div>

Hi,

One of our customers is implementing HTTP synthetic tests that rely on a JWT token with a 5-minute lifespan.

Within a single test execution, all requests must use a valid token. When the token expires, it can only be refreshed using the **most recently issued token** (token chaining is strictly required).

The challenge is that synthetic test executions are stateless, so each run does not have access to the last token generated in the previous run, and there’s no built-in way to persist or share tokens between executions.

Is there a recommended way to handle this scenario?

Thanks!

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [April 14, 2026, 1:44pm UTC](https://community.dynatrace.com/t/dynatrace-managed-synthetic-http-tests-with-jwt-token-chaining/55561/2 "2026-04-14T13:44:58Z")

</div>

If you need to use the token for multiple requests in the same monitor, you can use variables to pass it between the requests. See&nbsp;[Pre- and post-execution scripts for HTTP monitors in Classic — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/http-monitors-classic/pre-and-post-scripting-for-http-monitors-classic#variables)  
To persist between monitor executions, you’d be best using the credential vault. See&nbsp;[Pre- and post-execution scripts for HTTP monitors in Classic — Dynatrace Docs](https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/http-monitors-classic/pre-and-post-scripting-for-http-monitors-classic#retrieve-data)

---

<div class="post-metadata">

**Author:** ![GuyHalfon](https://avatars.discourse-cdn.com/v4/letter/g/f14d63/32.png) [@GuyHalfon](https://community.dynatrace.com/u/GuyHalfon)\
**Post date:** [May 6, 2026, 6:38pm UTC](https://community.dynatrace.com/t/dynatrace-managed-synthetic-http-tests-with-jwt-token-chaining/55561/3 "2026-05-06T18:38:31Z")

</div>

Hi HannahM,

We created a Synthetic HTTP monitor with multiple sequential requests.

In the first request, we retrieve the latest token from the Credential Vault, perform a refresh request, and then save the new token back to the vault for use in the next runs. The refresh works only with the latest token, so it’s critical that it gets updated each time.

However, after several runs, it seems the new token is not always saved, and the next execution uses an outdated token that no longer works.

Could there be a limitation on how frequently the Credential Vault can be updated, or a delay in persisting the new value? Or is this something we might be missing in our implementation?

Thanks.

---

<div class="post-metadata">

**Author:** ![hannahmac](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/hannahmac/32/41823_2.png) [@hannahmac](https://community.dynatrace.com/u/hannahmac)\
**Post date:** [May 7, 2026, 10:17am UTC](https://community.dynatrace.com/t/dynatrace-managed-synthetic-http-tests-with-jwt-token-chaining/55561/4 "2026-05-07T10:17:22Z")

</div>

Is it possible that one execution hasn’t finished and updated the token before the next execution is picked up to be run? The CV token for the first request is retrieved when the monitor is picked up by the ActiveGate for execution, so if there isn’t much time between executions, this could affect the token value retrieved. If you space the executions so there can be no overlaps, does this resolve the behavior?

---

<div class="post-metadata">

**Author:** ![GuyHalfon](https://avatars.discourse-cdn.com/v4/letter/g/f14d63/32.png) [@GuyHalfon](https://community.dynatrace.com/u/GuyHalfon)\
**Post date:** [May 17, 2026, 9:37am UTC](https://community.dynatrace.com/t/dynatrace-managed-synthetic-http-tests-with-jwt-token-chaining/55561/5 "2026-05-17T09:37:31Z")

</div>

Hi,

We tried increasing the time between executions to make sure there are no overlaps, but unfortunately it did not resolve the issue.

We will open a support ticket for further investigation.

Thank you!
