简体   繁体   English

Office365API:如何处理和过期的访问令牌

[英]Office365APIs : How to handle and expired Access Token

The Office365API provides a nice way to get an access token but there are no example on how to handle the situation when the token expires. Office365API提供了一种获取访问令牌的好方法,但是没有关于令牌过期时如何处理情况的示例。 Moreover, there does not seem to be a refresh token. 而且,似乎没有刷新令牌。

On the blog "How to: Integrate Office 365 with a web server app using Common Consent Framework" [ http://msdn.microsoft.com/en-us/library/office/dn605894(v=office.15).aspx ] there is the notion of getting a refresh token along with the access token. 在博客“如何:使用Common Consent Framework将Office 365与Web服务器应用程序集成”中[ http://msdn.microsoft.com/zh-cn/library/office/dn605894(v=office.15).aspx ]这里有获取刷新令牌和访问令牌的概念。 When the access token expires the refresh token can be used to get another access token / refresh token set without requiring the user to log into their office 365 account again. 当访问令牌到期时,刷新令牌可用于获取另一个访问令牌/刷新令牌集,而无需用户再次登录其Office 365帐户。

Does anyone know how to handle the expired access token using the Office365APIs? 有谁知道如何使用Office365API处理过期的访问令牌?

我的方式是

await _outAuthenticationInfo.ReauthenticateAsync(ExchangeResourceId);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用已使用V2模型保存在数据库中的令牌缓存登出到Office 365,刷新过期的访问令牌? - How to refresh the expired access token with out login to office 365 using token cache already saved in a database using V2 model? Outlook Exchange Office 365:如何从访问令牌获取电子邮件地址? - Outlook Exchange Office 365: How to get email address from access token? 如何限制 Office 365 应用程序的邮箱访问 - How to restrict mailbox access for office 365 app Office 365 API Microsoft Graph身份验证失败 - Office 365 APIs Microsoft Graph authentication failed 使用来自EWS或REST API的office365 JS API访问CustomProperties - Access CustomProperties set using office365 JS APIs from EWS or REST API 如何访问Lync Online(Office 365)的UCWA端点? - How to access the UCWA endpoint for Lync Online (Office 365)? C#.Net Office 365 API入门 - Getting Started with C# .Net Office 365 APIs Sfb要求输入密码窗口,在Office365租户上启用ModernAuthentication时,如何以编程方式处理它? - Sfb asks for password window, when ModernAuthentication is enabled on Office365 tenant, how to handle it programatically? 刷新令牌在访问令牌后立即过期 - Refresh token expired as soon as access token 访问令牌过期时使用刷新令牌 - Use Refresh Token When Access Token is Expired
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM