Microsoft Graph API刷新令牌已过期 [英] Microsoft Graph API Refresh Token Expired

查看:90
本文介绍了Microsoft Graph API刷新令牌已过期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Microsoft graph API集成到Office 365的Web应用程序.我已经使用该应用程序一年多了.最近,我收到一条错误消息,指出刷新令牌由于不活动而过期,因此我无法在3天之内更新该用户的订阅.

I have a web application integrated to Office 365 using Microsoft graph API. I have using the application for more than a year now. Lately I have been receiving an error stating the refresh token has expired due to inactivity hence I am not able to update that users subscription by 3 days.

现在,每当电子邮件到达用户收件箱时,侦听状态就会出现异常.

Now whenever an email hits the users inbox there is an exception in the listen state.

下面是错误消息

验证凭据时出错. AADSTS70008:由于不活动,刷新令牌已过期.该令牌于2017-02-16T19:08:12.3388232Z发行,在90.00:00:00处于无效状态.

Error validating credentials. AADSTS70008: The refresh token has expired due to inactivity. The token was issued on 2017-02-16T19:08:12.3388232Z and was inactive for 90.00:00:00.

错误消息的片段

请帮助解决此错误

推荐答案

签出

Check out this document on default and configurable token lifetimes.

通常,刷新令牌的默认生存期为14天,对于新访问+刷新令牌对,可以将其更新长达90天. 90天后,使用默认配置,用户将不得不再次以交互方式登录到您的应用程序.

In general, the default lifetime of a refresh token is 14 days, and that can be renewed for new access + refresh token pairs for up to 90 days. After 90 days, with the default configuration, a user will have to interactively sign into your application again.

我相信您看到的错误是此刷新令牌的最大使用期限"的结果.您可以配置此设置,以使其永不过期,但是这里更安全的做法是捕获此错误,并让用户再次登录.

I believe the error you are seeing is a result of this "Refresh Token Max Age". You have the ability to configure this setting so that it will never expire, but the safer practice here would be to catch this error, and have the user sign-in again.

这篇关于Microsoft Graph API刷新令牌已过期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆