From 0e488e66a373cecaa276442d5d93d34f14207262 Mon Sep 17 00:00:00 2001 From: assast Date: Fri, 23 Jan 2026 17:48:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=B7=E6=96=B0token?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E4=BD=BF=E7=94=A8=E7=9A=84=E6=98=AF=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=98=E9=87=8F=E7=9A=84client=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=8F=AF=E8=83=BDclientid=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=AD=89=E4=B8=8D=E4=B8=80=E8=87=B4=E5=AF=BC=E8=87=B4=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_outlook_app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web_outlook_app.py b/web_outlook_app.py index 1c39142..c256f0a 100644 --- a/web_outlook_app.py +++ b/web_outlook_app.py @@ -1185,13 +1185,14 @@ def test_refresh_token(client_id: str, refresh_token: str) -> tuple[bool, str]: """测试 refresh token 是否有效,返回 (是否成功, 错误信息)""" try: # 尝试使用 Graph API 获取 access token + # 使用与 get_access_token_graph 相同的 scope,确保一致性 res = requests.post( TOKEN_URL_GRAPH, data={ "client_id": client_id, "grant_type": "refresh_token", "refresh_token": refresh_token, - "scope": " ".join(OAUTH_SCOPES) + "scope": "https://graph.microsoft.com/.default" }, timeout=30 )