This article describes how to set up an OAUTH with email accounts, for example O365 with IMAP.
Please see KB0816072 for more detail on scopes and values for Office 365.
- You 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 value
- Specify Scopes as required by your email provider (Office 365)
- If you are using O365, provide the below scopes as separate entires to get both the Access and refresh tokens (https://outlook.office.com/IMAP.AccessAsUser.All , openid , offline_access) .
- Test the same configuration from POST MAN to make sure the parameters are correct and you are getting the tokens
- If the test from POST MAN is successful, attach the OAUTH profile to the newly created email accounts
- Now 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>.service-now.com/sysauto_script.do?sys_id=35faf162eb233100469a20425206fedc