问题
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