14 Apr 2026
02:40 PM
- last edited on
15 Apr 2026
07:26 AM
by
MaciejNeumann
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!
Solved! Go to Solution.
14 Apr 2026 02:44 PM
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 https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/http-monitors-classi...
To persist between monitor executions, you'd be best using the credential vault. See https://docs.dynatrace.com/docs/observe/digital-experience/synthetic-monitoring/http-monitors-classi...
06 May 2026 07:38 PM - edited 06 May 2026 07:39 PM
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.
07 May 2026 11:17 AM
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?
Featured Posts