MailboxNotEnabledForRESTAPI warning appears in Dynamics 365 mailbox alert

Applies to: Dynamics 365 Customer Engagement Online

Symptom


You see a warning like the following within a mailbox alert in Dynamics 365:

"A general mailbox access error occurred while sending the email message Test SSS with incoming via EXO profile but really on-prem through the mailbox <Mailbox Name>. The owner of the associated email server profile Microsoft Exchange Online has been notified. The system will try to send the message again later.

Email Server Error Code: MailboxNotEnabledForRESTAPI. Exchange.server returned 404 error."

Cause


This warning may be logged if the mailbox is configured with an Exchange Online email server profile in Dynamics 365 but the mailbox is actually an Exchange on-premises mailbox.

Resolution


If the mailbox is an Exchange on-premises mailbox, verify the Email Server Profile configured on the mailbox record is not an Exchange Online profile. An Exchange Server (Hybrid) profile should be used when connecting to an Exchange on-premises mailbox. 

For more information on configurding Dynamics 365 Online with Exchange on-premises, refer to the following article:

Connect Dynamics 365 for Customer Engagement apps (online) to Exchange Server (on-premises)
https://docs.microsoft.com/dynamics365/customerengagement/on-premises/admin/connect-exchange-server-on-premises