How to delete the O365 accounts stored in UiPath Studio in the Microsoft office 365 activities? How to flush the cache for the Interactive Token used in an Office365 activity so the pop-up for authentication can re-appear?
When an account is selected to be used in the O365 activities, two things occur.
- A cache is created that contains a token for the account so that re-authentication and configuration is not necessary each time the workflow is run (at least not unless the token expires etc.). The cache that holds the token is usually found in one of these locations, (depending on the selected authentication method) :
- %localappdata%\DataStore.Office365
- %appdata%\uipath\authentication\office365.tokens.cache
- The account name/ email is stored in the xaml file of the project so that it is visible in the accounts drop-down of the activity
- By manipulating the cache files, remove the accounts stored in the Microsoft Office 365 activities or reinforce the authentication pop-up to re-appear
Note: Before proceeding with the steps below, take a backup copy of:
- The UiPath Studio project folder
- The folders %localappdata%\DataStore.Office365 and/or %appdata%\uipath\authentication\office365.tokens.cache (depending on the authentication method, find both of these files on the computer or only one of them).
- Delete the authentication cache files
After making a back-up of the cache files, delete them from their original location (either %localappdata%\DataStore.Office365 or %appdata%\uipath\authentication).
- Open the project in UiPath Studio
Run the project as to force the re-authentication against the Azure app endpoint.
If any errors are obtained at activity level related to the account not being valid, re-create the activity and re-validate the account used for it.
If any errors are obtained at activity level related to the account not being valid, re-create the activity and re-validate the account used for it.