Troubleshooting OAuth 2.0 compliant Email Listener
Tags: integration, oauth2, authentication, microsoft
Published: 2022-10-26 08:48:32

---
title: Troubleshooting OAuth 2.0 compliant Email Listener
published: true
date: 2022-09-15 05:30:58 UTC
tags: integration, oauth2, authentication, microsoft
canonical_url: https://tech.forums.softwareag.com/t/troubleshooting-oauth-2-0-compliant-email-listener/263692
---

\*products versions - {webMethods Integration Server version: 10.3 and above}

## Introduction:

webMethods Integration Server supports OAuth 2.0 in Email Listener from 10.3 onwards. Since with [Microsoft announcement related to disabling of Basic Authentication for Outlook, EWS, RPS, POP, IMAP, and EAS protocols in Exchange Online from Oct 1 2022](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437) onwards, many users are now configuring Email listener with OAuth 2.0 to comply with the new Microsoft guidelines.

**NOTE:** In the [Microsoft announcement](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437), they are not disabling or changing any settings for SMTP AUTH, so Basic authentication will be working for sending mails (SMTP).

In this process of moving to OAuth 2.0 , user might encounter issues when trying to enable the Email listener. This article highlights the things that needs to be check in order to successfully enable a Email listener with OAuth settings.

## Pre-requisite

1. User has an account and setup application correctly in the Microsoft Azure. Please follow the article [Setting up OAuth 2.0 compliant email listener in Integration Server using Microsoft Azure Active Directory (Azure AD) - Knowledge base - webMethods - Software AG Tech Community & Forums](https://tech.forums.softwareag.com/t/setting-up-oauth-2-0-compliant-email-listener-in-integration-server-using-microsoft-azure-active-directory-azure-ad/239699)
2. Latest IS core fixes are applied on the environment.

## Troubleshooting Tips:

If **Email listener with OAuth settings is not enabled** , then please check:

1. "0068 Email Listener " component logging is set to TRACE in the Settings > Logging > View Server Logger Details

2. The “_ **Auth URL** _” and “_ **Access Token URL** _” in the Email listener is in below format.  
Auth URL :[https://login.microsoftonline.com/{TenantID}/oauth2/v2.0/authorize](https://login.microsoftonline.com/%7BTenantID%7D/oauth2/v2.0/authorize)  
Access Token URL: [https://login.microsoftonline.com/{TenantID}/oauth2/v2.0/token](https://login.microsoftonline.com/%7BTenantID%7D/oauth2/v2.0/token)

3. User has specified correct secret in the “_ **Client Secret** _” field. Note: Secret ID is different from Client Secret.

4. _ **Scope** _ is defined correctly and must be “`offline_access https://outlook.office365.com/IMAP.AccessAsUser.All`”

5. “ **Transport Layer Security** ” is set to “Implicit”

6. The Truststore configured in the “_**Truststore Alias (optional)**_” field has the certificates of the Microsoft server. Generally JVM truststore (cacerts) have certificates from the popular sites including Microsoft .

7. If “_ **Access Token Expiry Time** _” is empty, it means Integration Server has not yet received the Access token from the Microsoft. So, please enter the “_ **Client Secret** _” field and click on “_ **Get Authorization Code** _” link again to get a new Authorization code and access token.

8. Once the Email listener is enabled **but the service mentioned in the listener is not invoked** , then please check below mentioned configurations. This information is already there in Online Help/Integration Server Administrator guide.

9. Check the “_ **Access Mode** _” of the port. It should be “_ **Allow by Default** _” or the service is part of allowed list.

10. A user is specified in “_ **Run services as user** _” field in the Email Port. Otherwise the authentication details needs to be part of the Email message.

11. If “_ **Send reply email with service output** _” , “_ **Send reply email on error** _” are set to “Yes” in the Email port, then make sure that “_ **Email Notification** _” under "_ **Settings > Resources** _ " is configured correctly as those settings are used by Integration Server to send mails.

## Additonal Notes:

1. Integration Server support OAuth 2.0 for IMAP and SMTP (pub.client:smtp) only. Support of OAuth 2.0 for POP and “Email Notification” is planned and might be available in future fixes.

## Useful links | Relevant resources

1. [Microsoft identity platform and OAuth 2.0 authorization code flow - Microsoft Entra | Microsoft Docs](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow)
2. [Setting up OAuth 2.0 compliant email listener in Integration Server using Microsoft Azure Active Directory (Azure AD) - Knowledge base - webMethods - Software AG Tech Community & Forums](https://tech.forums.softwareag.com/t/setting-up-oauth-2-0-compliant-email-listener-in-integration-server-using-microsoft-azure-active-directory-azure-ad/239699)
3. [POP, IMAP, and SMTP settings (microsoft.com)](https://support.microsoft.com/en-us/office/pop-imap-and-smtp-settings-8361e398-8af4-4e97-b147-6c6c4ac95353)
4. [Basic Authentication Deprecation in Exchange Online – September 2022 Update - Microsoft Tech Community](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-september/ba-p/3609437)

[Read full topic](https://tech.forums.softwareag.com/t/troubleshooting-oauth-2-0-compliant-email-listener/263692)