You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Changelog
2
2
3
+
## Unreleased
4
+
5
+
### Added
6
+
7
+
- Automatic refresh-token redemption. When the stored access token is expired (or within a short skew window of expiring), the CLI now silently exchanges the persisted `refresh_token` for a fresh access token via the OAuth2 `refresh_token` grant and updates the keyring, instead of failing with `AUTH_TOKEN_EXPIRED` roughly an hour after login. The previous re-login behaviour remains as a fallback when no refresh token is stored or the refresh request is rejected. This resolves the standing "automatic refresh-token handling" known limitation (#16).
Copy file name to clipboardExpand all lines: docs/auth.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ Tokens are stored in the operating system keyring:
194
194
195
195
The config file stores profile settings, not access tokens.
196
196
197
-
Current known gap: automatic refresh-token handling is not yet release-grade. If a token expires and refresh does not happen, commands return `AUTH_TOKEN_EXPIRED` and the user must run `teams auth login` again.
197
+
The CLI automatically redeems the stored refreshtoken when an access token is expired or near expiry, then updates the keyring with the refreshed token. If no refresh token is stored, or the identity platform rejects the refresh request, commands return `AUTH_TOKEN_EXPIRED` and the user must run `teams auth login` again.
Copy file name to clipboardExpand all lines: docs/faq.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,7 @@ Teams/Graph can list chats that later fail message reads because the user is no
63
63
64
64
## Why did I get `AUTH_TOKEN_EXPIRED`?
65
65
66
-
The stored access token expired. The CLI requests `offline_access`, but automatic refresh-token handling is still a release-readiness gap. Run:
66
+
The CLI automatically refreshes an expired access token using the stored refresh token (login requests `offline_access`), so this should be rare. You will still see `AUTH_TOKEN_EXPIRED` when no refreshtoken is stored or the refresh is rejected — for example the refresh token itself expired or was revoked. In that case, re-authenticate:
Copy file name to clipboardExpand all lines: docs/release-readiness.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Live read-only validation passed against the OSO profile:
29
29
Known live behavior:
30
30
31
31
- Some meeting chats can appear in `chat list` but reject message reads with `403` if the user is no longer in the roster.
32
-
- Stored token expiry currently requires manual re-login.
32
+
- Stored token expiry is handled through refresh-token redemption when a refresh token is available. `AUTH_TOKEN_EXPIRED` still means the refresh token is missing, expired, revoked, or rejected by the identity platform.
33
33
34
34
Entra app registration status as of 2026-05-27:
35
35
@@ -120,15 +120,14 @@ Dependabot is configured to group GitHub Actions updates into one PR so the comp
120
120
These must be resolved before marketing this as production-ready for external customers:
121
121
122
122
1. Publisher verification for the OSO Entra app.
123
-
2. Automatic refresh-token handling and tests.
124
-
3. Windows live validation using Windows Credential Manager.
125
-
4. Controlled write/read smoke test in a dedicated Teams test channel.
126
-
5. Documented admin-consent onboarding flow for customer tenants.
127
-
6. Clear policy for unsupported Graph operations, tenant restrictions, and destructive commands.
128
-
7. Security review of token storage, logs, and exported token behavior.
129
-
8. Versioned release notes and upgrade guidance.
130
-
9. Public website HTTPS fixed for `https://msteamscli.com/`; HTTP is live, but the current TLS certificate does not cover the hostname.
131
-
10. Terms of service URL published and added to the Entra app branding.
123
+
2. Windows live validation using Windows Credential Manager.
124
+
3. Controlled write/read smoke test in a dedicated Teams test channel.
125
+
4. Documented admin-consent onboarding flow for customer tenants.
126
+
5. Clear policy for unsupported Graph operations, tenant restrictions, and destructive commands.
127
+
6. Security review of token storage, logs, and exported token behavior.
128
+
7. Versioned release notes and upgrade guidance.
129
+
8. Public website HTTPS fixed for `https://msteamscli.com/`; HTTP is live, but the current TLS certificate does not cover the hostname.
130
+
9. Terms of service URL published and added to the Entra app branding.
Copy file name to clipboardExpand all lines: docs/troubleshooting.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,16 +18,16 @@ RUST_LOG=teams=debug teams chat list --output json
18
18
19
19
## `AUTH_TOKEN_EXPIRED`
20
20
21
-
Meaning: the keyring token is expired.
21
+
Meaning: the keyring access token is expired and could not be refreshed automatically.
22
22
23
-
Current workaround:
23
+
The CLI now silently redeems the stored refresh token when the access token is expired or about to expire, so this error normally only appears when no refresh token is stored or the refresh request is rejected (for example the refresh token expired or was revoked).
24
+
25
+
Resolution:
24
26
25
27
```bash
26
28
teams auth login --device-code
27
29
```
28
30
29
-
Release-readiness note: automatic refresh-token handling still needs to be completed and validated.
0 commit comments