microsoft / microsoft/work-iq

WorkIQ session disconnects after ~60 minutes of inactivity (likely OAuth token refresh failure)

Open
#151 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1k
Forks
132
Avg merge
5d 19h
Merged PRs (30d)
6

Description

Describe the bug
WorkIQ disconnects/becomes unauthenticated approximately 60 minutes after the last interaction. Re-authenticating restores functionality. This appears to align with the default M365 OAuth access token lifetime, suggesting the silent token refresh is not working correctly in the Github Copilot App context.

To Reproduce

  1. Launch Github Copilot App and authenticate with WorkIQ // should happen automatically
  2. Use WorkIQ normally
  3. Leave session idle for ~60 minutes
  4. Attempt any WorkIQ command
  5. Session is disconnected / requires re-authentication

Expected behavior
WorkIQ should silently refresh the access token in the background (using the refresh token) and maintain the session without requiring manual re-authentication.

Actual behavior
Session drops after ~60 minutes. Commands fail and re-login is required.

Environment

  • OS: Windows 11
  • M365 tenant: commercial
  • WorkIQ version: (run workiq --version and fill in)
  • Use case: automated daily discovery runs against M365 data sources (meetings, email, Teams, Planner)

Additional context
This particularly impacts automated/scheduled workflows where an interactive re-auth prompt is not viable.

Workaround
Manually run workiq logout + re-authenticate before each use session.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running workiq --version and reproducing the idle-session failure in the GitHub Copilot App authentication flow. Trace how the OAuth access and refresh tokens are handled after roughly 60 minutes of inactivity. Done means scheduled or subsequent WorkIQ commands remain authenticated without requiring logout and re-authentication.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, powershell
Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.