How to use refresh token to get new access token in Excel add-in using OfficeJS

心不动则不痛 提交于 2021-01-29 08:47:51

问题


We are using Office js helpers to achieve login screen with OAUTH identity server(3rd-Party OAuth Implicit Provider) and we were able to get id token and access token successfully. Based on our requirement we have to use refresh token to get new access token once it is expired within specified duration. Can you please help on achieving this requirement.


回答1:


The office-js-helpers library is deprecated. You can still use it, but Microsoft doesn't support it. For code that shows the use of the OAuth 2.0 Implicit Flow (which is what the office-js-helpers library uses) in an add-in, we now point people to Office Add-in Microsoft Graph React. However, this stack answer indicates that you can't use refresh tokens with the Implicit Flow. It suggests a workaround.



来源:https://stackoverflow.com/questions/61654587/how-to-use-refresh-token-to-get-new-access-token-in-excel-add-in-using-officejs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!