How to fix Microsoft graph api throws The mailbox is either inactive, soft-deleted, or is hosted on-premise while creating event

Subasri 25 Reputation points
2023-12-11T06:09:05.7333333+00:00

I want to create meeting event. I have added user in azure ad and also assigned delegated permission Calendars.ReadWrite.

But while creating event by following lines it throws error:
var response = await graphClient.Me.Calendar.Events.Request().AddAsync(@event);

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

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 46,371 Reputation points
    2023-12-11T06:17:50.9766667+00:00

    Hi @Subasri

    This error means the current user is missing an available EXO mailbox, please try granting an Office 365 license to this user.

    Hope this helps.

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


1 additional answer

Sort by: Most helpful
  1. Subasri 25 Reputation points
    2023-12-11T06:53:27.4466667+00:00

    how to add EXO Mailbox and Office 365 license

    0 comments No comments

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.