MailboxNotEnabledForRESTAPI error resolution

Question

How do I resolve the 'MailboxNotEnabledForRESTAPI' error when connecting a Microsoft mailbox to Nylas?

Scenario

You receive the error MailboxNotEnabledForRESTAPI when attempting to connect or sync a Microsoft mailbox with Nylas. This error may appear when listing messages, events, or folders, and typically includes a message such as:

MailboxNotEnabledForRESTAPI: The mailbox is either inactive, soft-deleted, or is hosted on-premise.  

Solution

This error indicates that the mailbox does not have Microsoft Graph API (REST API) access enabled. This can happen for several reasons:

  1. The mailbox is inactive or soft-deleted.
  2. The mailbox is hosted on-premise or in a hybrid Exchange environment without Graph API enabled.
  3. The mailbox is an admin or service account that is restricted from third-party app access.
  4. The Microsoft 365 license assigned to the mailbox does not include Graph API access.

Steps to resolve:

  • Confirm the mailbox is active and not soft-deleted.
  • If the mailbox is hosted on-premise or hybrid, check with the email administrator to ensure Graph API access is enabled for the mailbox.
  • Verify that the correct user email is used during authentication. Admin accounts are often restricted from third-party access for security reasons.
  • Ensure the mailbox has a Microsoft 365 license that supports Graph API access.
  • If the mailbox cannot be enabled for Graph API, consider using IMAP or Exchange (EWS) as an alternative, if supported.

For more details on configuring Microsoft Graph API access, see the Creating an Azure auth app guide.

Updated

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.