Mail Service Integration Does Not Poll Office 365 Mailbox when using OAUTH
search cancel

Mail Service Integration Does Not Poll Office 365 Mailbox when using OAUTH

book

Article ID: 281289

calendar_today

Updated On:

Products

Clarity PPM SaaS Clarity PPM On Premise

Issue/Introduction

You are using the Clarity Mail Service.  You have it pointed to an Azure app / Office 365.  You can generate the OAUTH token and Refresh Token, but once the Mail Service Polls, it fails to authenticate with Azure.

Steps to Reproduce:

  1. Login to Clarity Administration -->General Settings--> Mail Service
  2. Configure for Office 365
  3. Enter appropriate details such as "Client Id", "Client Secret."
  4. Click the "Generate Access Token" button. The Mail Service fields for "Access Token Generated" and "Refresh Token" are then checked.
  5. Click the "Enable Tracing" checkbox and activate the Mail Service.
  6. Monitor the "bg-system.log" and you will see an error like the following:
2024/03/27 13:05:09.940 | DEBUG IMAPS: trying to connect to host "imap-mail.outlook.com", port 993, isSSL true
2024/03/27 13:05:10.040 | * OK The Microsoft Exchange IMAP4 service is ready. [####################################################################]
2024/03/27 13:05:10.040 | ADZ0 CAPABILITY
2024/03/27 13:05:10.040 | * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
2024/03/27 13:05:10.040 | ADZ0 OK CAPABILITY completed.
2024/03/27 13:05:10.041 | DEBUG IMAPS: AUTH: PLAIN
2024/03/27 13:05:10.041 | DEBUG IMAPS: AUTH: XOAUTH2
2024/03/27 13:05:10.041 | DEBUG IMAPS: protocolConnect login, host=imap-mail.outlook.com, user=############@##############.com, password=<non-null>
2024/03/27 13:05:10.041 | DEBUG IMAPS: AUTHENTICATE PLAIN command trace suppressed
2024/03/27 13:05:10.941 | DEBUG IMAPS: AUTHENTICATE PLAIN command result: ADZ1 NO AUTHENTICATE failed.

 

Expected Results:  Mail Service Polls mailbox successfully

Actual Results: Mailbox poll fails with an authentication error

 

Environment

Clarity 16.1.3, 16.2, 16.2.1

Cause

DE79209

Resolution

Workaround:  Use IMAP with Basic Authentication (in contrast to OAUTH).  De-select "Prefer TLS" and set the "Encryption Type" to 'None'. De-select "Prefer TLS" and set the "Encryption Type" to 'None'

DE79209 is fixed in 16.3.0 (Targeted to release November 2024) and also backported to 16.2.3 patch 1