How to Keep Persistent Office 365 Login with a Client Secret
When logging in to Office365 using the just Office365 connection Microsoft will enforce a two-week token that once expires will request that you re-log into the mail account.
The method described below will allow you to utilise a Client-Secrect during the login process, this will then allow you to maintain a persistent connection to your mailbox without having to re-authenticate every two weeks.
1- Ensure you have the latest version of ThinkAutomation installed. To check this click File -> Check for Updates
2 - Once confirmed you have the latest version from within the ThinkAutomation Studio Click File -> Server Settings -> Microsoft Logins
3 - Pop a tick in the tick box to allow you to populate the required fields.
4 - From the ThinkAutomation AppRegistration within Azure populate the required fields. If ThinkAutomation can not create this automatically you will need to follow this guide for manual setup of the AppRegistration - How to Manually Authenticate with Office365 and Azure Message Sources
5 - Please note that the Client Secret Value is required not the Secret ID
6 - Once you have populated the three empty fields click the Veriffy button to ensure the credentials are correct.

7 - Click OK to Save the
8 - Double-click on an Office365 Message Source and re-authenticate.

9 - Enter the email address as you usually would.

10 - Then enter the password as usual.

11 - ThinkAutomation will then authenticate with the added Client-Secret which will then maintain a persistent connection to the mailbox without a two-week expiry token.