cosmos.azure.com: Cosmos Explorer error when AAD token expires
- Dominant language
- TypeScript
- Stars
- 131
- Forks
- 67
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 10
Description
When using the https://cosmos.azure.com/ explorer, after a period of inactivity the AAD token expires, and the site doesn't refresh the token. The following error is displayed:
`Failed to query item for container {container}:
Request blocked by Auth {resource} : Provided AAD token has been expired since [1/30/2025 10:38:31 AM (UTC)]. Current server time is [1/30/2025 2:47:35 PM (UTC)]. Please refresh the AAD token.
ActivityId: 5ced279c-2e04-4f54-88ed-e6ce694ba91f, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0`
This force you to do a browser window refresh, which loses all open query tabs, and resets the connected database to whichever was last accessed in the browser, which may be different to the window being refreshed.
Can the AAD token be refreshed without forcing a browser window refresh?
Contributor guide
Research direction
Start by reproducing the expired AAD token flow at https://cosmos.azure.com/ after inactivity and trace the Explorer's authentication entry points; the issue names no repository files or tests. Done means the token refreshes without a full browser refresh, while open query tabs and the connected database remain intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100