Caught unhandled exception : Mailbox info is stale

SendEmailNotification is throwing this exception “Caught unhandled exception : Mailbox info is stale” while sending email using Microsoft graph. Doesn’t get this exception always.

The Mailbox info is stale error is typically an intermittent Microsoft Graph / Exchange routing issue rather than a Pega email rule defect. This happens when mailbox routing information is stale or incorrect, and the recommended fix is to ensure the request uses the correct mailbox identity and not a cached or mismatched routing value.

Since it does not happen every time, treat it as a transient service/routing condition as well and add retry/backoff handling. Also verify that the Graph mailbox identity, permissions and any routing hints used by the integration are correct and refreshed before sending.

Hi Ravi, thank you for the insight. It would be really helpful if you could elaborate on fixes you mentioned.

  1. the recommended fix is to ensure the request uses the correct mailbox identity and not a cached or mismatched routing value - I suppose mailbox identity would be used from email account. Even if it is cached, should not be a problem for a single email account in the application.

  2. verify that the Graph mailbox identity, permissions and any routing hints used by the integration are correct and refreshed before sending - how do I verify this?

Yes, by mailbox identity I meant the mailbox/address that the integration is actually sending through. If there is only one email account configured, then it is less likely to be a wrong-account issue. In that case, the more likely problem is that the integration or Graph layer is using stale mailbox metadata / routing context internally, even though the configured email account itself has not changed.

  • the mailbox in Microsoft 365 / Exchange Online should be an active cloud mailbox and not inactive, soft-deleted, migrated, or on-premises.
  • Check the app permissions
    • Verify the Azure/Entra app registration has the required Microsoft Graph permissions for sending mail.
    • Make sure admin consent has been granted.
    • If permissions were changed recently, re-authorize or refresh the integration so the new consent is picked up.
  • Verify the sender identity used by Pega & Refresh the integration if anything changed
    • If the mailbox, secret, certificate, or permissions were updated, restart or re-save the email authentication/integration configuration so cached auth context is refreshed.
    • Even with one mailbox, stale auth or cached routing context can still cause intermittent failures.
  • Test outside Pega if possible
    • Try sending through Graph using the same mailbox and same app registration from a simple Graph test.
    • If the issue reproduces outside Pega, it confirms the problem is at the mailbox/Graph layer rather than Pega logic.