How to setup email accounts with OAUTHSummaryThis article describes how to set up an OAUTH with email accounts, for example O365 with IMAP. Please see KB0816072 - Configure SMTP and IMAP email accounts with Microsoft Office365 using OAuth2 for more detail on scopes and values for Office 365.InstructionsYou need to enable the email-oauth plugin in the instance "com.glide.email.oauth"Create new OAUTH profile with type is "Connect to a third party OAUTH Provider"Populate all the fields based on the OATUH endpoint's valueSpecify Scopes as required by your email provider (Office 365)If you are using O365, provide the below scopes as separate entries to get both the Access and refresh tokens: https://outlook.office.com/IMAP.AccessAsUser.Allopenidoffline_access Test the same configuration from POST MAN to make sure the parameters are correct and you are getting the tokensIf the test from POST MAN is successful, attach the OAUTH profile to the newly created email accountsNow you can see the UI action "Authorize Email Account Access" to get the tokens in the email account.As long there is a valid refresh token is available, the scheduled job named "Refresh email access token" will run every 3 minutes to check and get the new Access token.URL: https://<instance-name>.service-now.com/sysauto_script.do?sys_id=35faf162eb233100469a20425206fedc