Microsoft Office 365 Send Mail fails with MailboxNotEnabledForRESTAPIMessage

Why does Send Mail activity fail with error: Microsoft Office 365 Scope: Code: MailboxNotEnabledForRESTAPIMessage: The mailbox is either inactive, soft-deleted, or is hosted On-Premise?

Issue: Send Mail activity fails with error: Microsoft Office 365 Scope: Code: MailboxNotEnabledForRESTAPIMessage: The mailbox is either inactive, soft-deleted, or is hosted On-Premise.

Root Cause: This error, it could be because no Exchange Online mailbox is available to use for the Azure AD users, who do not have a valid Microsoft Office 365 license.


Resolution:

  • Make sure that the Azure AD user has a valid M365 license. Consult the Microsoft documentation for instructions on this.