Enabling OAuth Authentication for IMAP/POP3/SMTP
  • 13 Mar 2024
  • 2 Minutes to read
  • Dark
    Light

Enabling OAuth Authentication for IMAP/POP3/SMTP

  • Dark
    Light

Article summary

Breaking Change in v7.14/v8.6 and Higher Versions for IMAP/POP3
Microsoft is deprecating basic authentication in Exchange Online servers from October 1, 2022 (reference article Deprecation of Basic authentication in Exchange Online). This deprecation will cause a breaking change in flows / processes using IMAP or POP3 steps to interact with emails on Exchange Online Servers (On-Premises servers require no changes). Generally, processes that scrape, search or fetch emails from inboxes will be affected. You may be affected if you have a process with this structure or you are using these steps and interacting with an Exchange Online server.


To check if any Flow is using any POP3 or IMAP steps.
Navigate to Settings > Administration > System Tools > Flow Management > Flow Structure. Search for IMAP/POP3 in the search bar. Check for any of the below steps is visible.

IMAP StepsPOP3 Steps
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.DeleteDecisionsFramework.Design.Flow.CoreSteps.EMail.Pop3.GetHeaders
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.GetCountDecisionsFramework.Design.Flow.CoreSteps.EMail.Pop3.GetEmail
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.GetEmailDecisionsFramework.Design.Flow.CoreSteps.EMail.Pop3.GetCount
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.GetHeadersDecisionsFramework.Design.Flow.CoreSteps.EMail.Pop3.Delete
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.GetHeadersInFolder
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.ListFoldersInImap
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.MarkAsRead
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.MarkAsUread
DecisionsFramework.Design.Flow.CoreSteps.EMail.Imap.Move

If you return any of the above steps, and it is related to an active process, AND you are connecting to an Exchange Online Server, then there is a strong chance the authentication will fail, and the process will break.
You might need to reconfigure all the affected IMAP/POP3 steps to use OAuth. It will not be automatic. It will be on a per-step basis.

Refer to the following table to map the inputs of the step.

PropertyDescriptionData Type
FolderName of the Folder the emails are located in. (Inbox, Spam, Trash, etc.)String
Inline Images as AttachmentsAdds images that are inline in an email as an attachment.Boolean
OAuth TokenAllows a user to specify the IMAP or POP3 email server token. (Requires: email account configured for OAuth and POP3 or IMAP; OAuth Provider and Token for POP3 or IMAP).String
PasswordThe password of the user connecting to the email server.String
PortPort number of the email server.Int32
Secure ConnectionUsed if the email server credentials require a secure connection (must be true when using OAuth for POP3 or IMAP).Boolean
ServerIMAP or POP email server.String
Unique IDThe Get Email step uses a Unique Id to retrieve the full message from an Email. This field assumes that previous steps may output more than one Message Header to get a certain message category.String
Use OAuthSpecifies the use of OAuth authentication.Boolean
UsernameUsername to connect to the email server.String

Refer to IMAP/POP3 step library articles to map all the steps.

For additional Reference, refer to the official Microsoft documentation,


Enabling OAuth Authentication for Email Accounts (SMTP configuration)

Due to Microsoft's depreciation of basic authentication for Office 365 accounts, in 8.6+, users with Office 365 accounts will need additional configuration to ensure the accounts will work with email steps. Note that this is specific to IMAP/POP3 steps; basic authentication (username/password) will still work properly with the standard email steps. 


Prerequisites:


Configuration

  1. Navigate to C:\Program Files\Decisions\Decisions Server and open the Settings.xml file.
  2. Locate <Mail> and add the below code. Ensure to update the necessary elements with the appropriate information
    <SmtpServer>
    	<ServerAddress>smtp.office365.com</ServerAddress>
    	<ClientDomain />
    	<Port>587</Port>
    	<RequiresAuthentication>true</RequiresAuthentication>
    	<UseOauth>true</UseOauth>
    	<OauthTokenId>YOURTOKENHERE</OauthTokenId>
    	<Username>MICROSOFTACCOUNTUSEDFORTOKENHERE</Username>
    	<Password />
    	<UseSSL>true</UseSSL>
    	<UseImplicitSSL />
    	<SkipCertificateRevocationCheck>false</SkipCertificateRevocationCheck>
    </SmtpServer>
  3. Click Save to save the file.

For further information on Administration, visit the Decisions Forum.

Was this article helpful?