We’re connecting Rhythms to Dynatrace’s hosted remote MCP server using a confidential OAuth client with Authorization Code + PKCE. We need reliable per-user access without requiring users to remain signed into Dynatrace in their browser.
Normal refresh works. However, after explicitly signing out of Dynatrace, refresh fails. We independently reproduced this in VS Code on October 6:
- Before logout: refresh succeeded.
- After logout: HTTP 400, invalid_grant, UNSUCCESSFUL_OAUTH_REFRESH_TOKEN_VALIDATION_FAILED.
- VS Code required a new login.
Separately, Rhythms has encountered UNSUCCESSFUL_OAUTH_REFRESH_TOKEN_MISSING_SESSION with “User session is no longer active.” We haven’t established whether all these failures have the same cause.
Could the OAuth/MCP team clarify:
- Is refresh-token invalidation after logout expected?
- What are the refresh-token and underlying session lifetimes, including idle limits?
- Is offline_access, or an equivalent persistent-access option, available for Authorization Code MCP clients? How is it enabled, and does trial versus paid account status matter?
- What is the supported approach for reliable background, per-user MCP access without frequent reconnection or switching to client credentials?
2 Likes
@vedant05422 can your users use platform tokens instead? Platform tokens — Dynatrace Docs
1 Like
Thanks Julius! Platform tokens could be a fallback, but we prefer OAuth so customers don’t have to manually create and manage tokens. Is there a supported way to obtain persistent per-user access to the hosted remote MCP server through Authorization Code OAuth—such as offline_access or an equivalent? We reproduced refresh failure after Dynatrace logout in VS Code too, and would appreciate clarification on the expected session lifetime and refresh behavior.
Hi @vedant05422 ,
Thanks for the detailed report. Here is what we see on our side.
- Refresh invalidation after logout. Expected. Refresh tokens issued without offline_access are bound to the SSO session. Explicit logout ends the session and invalidates those tokens. The two errors you saw map to the two checks that run: VALIDATION_FAILED when the token record is gone, and MISSING_SESSION (“User session is no longer active”) when the token exists but its session is not active. To confirm: which of the two appears after logout in your flow.
- Lifetimes: Identity and Access Management limits — Dynatrace Docs
- Refresh token: 1-day validity, rotated on each use
- Access token: 10 minutes
- offline_access would be helpful because it detaches refresh token from SSO session but we don’t offer it now for customer generated OAuth clients
- offline_access is something we have to consider on our roadmap. Thank you for bringing that. I think it is valuable improvement .
1 Like
Thanks Marcin—that’s helpful clarification.
After explicit logout, both Rhythms and VS Code returned invalid_grant with UNSUCCESSFUL_OAUTH_REFRESH_TOKEN_VALIDATION_FAILED. We’ve separately observed UNSUCCESSFUL_OAUTH_REFRESH_TOKEN_MISSING_SESSION in Rhythms.
Could you confirm whether the 12-hour maximum SSO lifetime forces interactive reauthorization even when refresh tokens are regularly rotated? Also, does refreshing reset the one-hour inactivity timeout?
Our use case requires persistent, per-user access to the hosted remote MCP server for customer workflows. Platform tokens could be a fallback, but we’d prefer not to require users to manually create and rotate credentials.
Is there an approved partner-client option or an offline-access preview we could participate in? This is affecting a customer integration, and we’d be happy to help test a supported solution.