Graph calendar api return exception "MailboxNotEnabledForRESTAPI" when i use MTR account.

giuseppe ranieri 0 Reputation points
2023-01-23T12:22:18.2766667+00:00

I'm trying to get a meeting list for an account of type MTR but graph api returns this exception:

Code: MailboxNotEnabledForRESTAPI

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

how can i solve it?

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

1 answer

Sort by: Most helpful
  1. HarmeetSingh7172 4,811 Reputation points
    2023-01-23T12:39:04.31+00:00

    Hello @giuseppe ranieri

    Thanks for reaching out!

    It seems there is no valid M365 license assigned to an AAD user. This error can occur if the mailbox is on a dedicated Microsoft Exchange Server and is not a valid Microsoft 365 mailbox. Please note that Exchange Online mailbox and outlook calendars will only be available/created for the users with a valid M365 license.

    Please refer to this similar post and documentation.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    0 comments No comments