AADSTS700082: the teams-mcp refresh token expired after long idle
Fixes teams-mcp failing after weeks of disuse with an AADSTS refresh-token error. Use when auth worked, then broke after a long gap. Not for fresh-install login failures.
AADSTS700082: the teams-mcp refresh token expired after long idle
TL;DR: Re-run npx @floriscornel/teams-mcp@latest authenticate; the cached refresh token in ~/.teams-mcp-token-cache.json expired after 90 days idle. Token refresh is silent until the refresh token itself dies, then the first call after the gap fails. Nothing else needs changing; the new grant overwrites the stale cache.
The error
AADSTS700082: The refresh token has expired due to inactivityFix it
- Confirm the token cache file is old (~/.teams-mcp-token-cache.json).
Expected: Its timestamp is months back.
- Run npx @floriscornel/teams-mcp@latest authenticate and complete login.
Expected: A fresh token set is cached.
- Call the auth_status tool.
Expected: It shows authenticated again.
When this applies
teams-mcp auth breaks with an AADSTS error after a long period without use.
When this does NOT apply
If it never worked, the initial login is the problem. Device-code expiry mid-login is a different error.
Tool compatibility
@floriscornel/teams-mcp with MSAL token cache
Also seen as
- teams-mcp AADSTS700082
- teams MCP refresh token expired
- teams-mcp idle auth failure
Why it happens
MSAL refresh tokens expire after 90 days of inactivity. The server refreshes access tokens silently, so the expiry is invisible until the first use after the gap, which then fails.
Edge cases
- Scheduled jobs that run quarterly will hit this every time; re-auth before the run.
- Deleting the cache file forces a clean login if the flow misbehaves.
- The auth metadata file (~/.msgraph-mcp-auth.json) is separate and usually fine.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.