Getting "MailboxNotEnabledForRESTAPI" error when trying to address user mailbox

auto community2 0 Reputation points
2024-07-07T06:08:48.94+00:00

Hey,

I have an access token of a user and once trying to use it I'm getting the following error:
Status code: 404,

 “error”:

“code”: “MailboxNotEnabledForRESTAPI”,         

“message”: “The mailbox is either inactive, soft-deleted, or is hosted on-premise.”

I have checked with the user and he say that the mailbox is active and not deleted.
I have also checked verified that my app is configured as "multi-tenant".

What else can be the issue?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,278 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andy David - MVP 149.2K Reputation points MVP
    2024-07-07T15:42:15.64+00:00

    If the mailbox is in 365, its needs an Exchange license.

    If its on-prem, then this wont work regardless.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.