# Dynatrace integration using expired jwt token

**URL:** <https://community.dynatrace.com/t/dynatrace-integration-using-expired-jwt-token/54674>\
**Category:** Alerting\
**Tags:** problem-notification, anomaly-detection\
**Created:** [January 19, 2026, 3:49pm UTC](https://community.dynatrace.com/t/dynatrace-integration-using-expired-jwt-token/54674 "2026-01-19T15:49:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![monique\_vanwall](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/monique_vanwall/32/11403_2.png) [@monique\_vanwall](https://community.dynatrace.com/u/monique_vanwall)\
**Post date:** [January 19, 2026, 3:49pm UTC](https://community.dynatrace.com/t/dynatrace-integration-using-expired-jwt-token/54674/1 "2026-01-19T15:49:20Z")

</div>

after migration to SAAS , integration on alerts is failing regularly with expired token.

I got confirmation of support “To remain efficient and avoid unnecessary calls to Entra ID, Dynatrace caches the JWS token.&nbsp;It continues to use the cached token until the destination returns a&nbsp;401 Unauthorized.”

Advice :

1. Increase the token lifetime&nbsp; → Less failures.
2. Edit the anomaly settings for the API-GW service to ignore 401 errors.

both of the options are not realistic : Increasing the token lifetime will not be allowed by security AND will only decrease but will keep on occurring (but less frequent)  
Anomaly settings on API-GW to ignore 401 errors, would give a false view, as there might be other causes for the 401’s wich we would be missing.

Anyone having same experience ?&nbsp; Any idea how to solve ?&nbsp; And why does DT not test on expiration before (re-)using the token ?

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [January 21, 2026, 1:52pm UTC](https://community.dynatrace.com/t/dynatrace-integration-using-expired-jwt-token/54674/2 "2026-01-21T13:52:54Z")

</div>

Hi,  
i will try answer 😉

Entra ID access tokens are short-lived and can vary (often ~60–90 minutes by design).

> **[Azure AD Access Token Lifetimes and PowerShell Scripts](https://office365itpros.com/2023/05/29/azure-ad-access-token-lifetime/)**
>
> Sometimes the default Azure AD access token lifetime isn't long enough for long-running PowerShell scripts. One solution is to extend the token lifetime.

I think you can try one of this options:  
First option is create&nbsp;proxy/webhook receiver.

Dynatrace → your proxy endpoint

Proxy handles Entra auth, refreshes proactively (e.g., refresh when \<5 minutes left), then calls API-GW.  
No security exceptions, no “ignore 401”, full control (retries, logging, idempotency).

Second option is&nbsp;Use Dynatrace Workflows instead of the legacy notification integration.

Workflows allow:

HTTP Request with Credential Vault, and for advanced auth:

Run JavaScript to fetch a fresh Entra token “just-in-time” and send the request.

> **[HTTP request action for Workflows](https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/default-workflow-actions/http-request-workflow-action)**
>
> Execute HTTP request action for your workflows.

Why doesn’t Dynatrace check the token expiry before reuse?

- tokens aren’t always safely/consistently parseable/usable as a “trustworthy expiry source” across providers,
- standard integration pattern: use cached bearer → refresh on 401
