Intermittent Email Listener Failure Due to HTTP 404 Errors (MS Graph API)

We encountered an intermittent issue where Interactions were not being created from incoming emails processed by the Pega Email Listener. The issue occurred sporadically, making it difficult to reproduce consistently.

During troubleshooting, multiple errors were observed in the logs. One of the key errors was an HTTP 404 response from the Microsoft Graph API.

The 404 response is generally considered an expected Microsoft Graph API response and typically indicates one of the following:

  • The provided userPrincipalName or GUID of the user/mailbox is incorrect.
  • The mailbox refers to an on-premises Exchange resource rather than a cloud mailbox.

While this is a common cause of 404 errors, our investigation revealed a different root cause.

After collaborating with both the Microsoft team and Pega Global Customer Support (GCS), it was determined that the issue was a product-level defect in the Pega Email Listener component.

During periods of high mailbox activity, Microsoft Outlook message IDs could change between:

  1. Retrieving the email from the mailbox.
  2. Attempting to delete the same email using the Microsoft Graph API.

Since the message ID had changed, the delete request referenced an invalid ID, resulting in an intermittent HTTP 404 (Not Found) response. Consequently, email processing failed, preventing the corresponding Interaction from being created.

Using the ImmutableId ensures that the message ID remains stable throughout mailbox operations, even if the message is moved or modified. This prevents failures caused by changing message identifiers during processing.

Pega identified this as a product defect and provided a hotfix to address the issue.

  • Applicable Version: Pega Platform 25.1.3
  • The fix updates the Email Listener to use immutable message IDs, preventing intermittent 404 errors during mailbox processing.
  • The fix is also planned to be included in upcoming Pega version updates, eliminating the need for a separate hotfix in future releases.