Microsoft Office 365 error. AADSTS700082: The Refresh Token has Expired due to Inactivity

How to refresh the token, when using Office365 activity an error is thrown: "AADSTS700082 The refresh token has expired due to inactivity" ?

When using Office365 activity an error is thrown: AADSTS700082 The refresh token has expired due to inactivity is because the “Access” and “Refresh” token for Office365 has expired.

In order to refresh such token, depending on the flow being used it can manually be deleted from the machine and do the authentication once more:

  • If Windows Integrated Authentication or Interactive Authentication is used, on the Robot machine navigate to %localappdata%\DataStore.Office365 > delete the token from there and do the authentication once more
or
  • If Username+ Password or Application ID + Secret is used, on the Robot machine navigate to %appdata%\uipath\authentication\office365.tokens.cache > delete the token from there and authenticate once more.

It is also recommended to upgrade to the UiPath.MicrosoftOffice365.Activites 1.6.0 version, as the "Access token has expired" error has also been fixed. Release notes can be checked here  .