Microsoft graph api of outlook folders throwing exception for one of our user.The mailbox is either inactive, soft-deleted, or is hosted on-premise.

Markandey Kumar 1 Reputation point
2022-06-10T10:35:57.15+00:00

I want to fetch folders using graph api.

URI for fetching folders: https://graph.microsoft.com/v1.0/me/mailFolders?$filter=displayName eq 'inbox' or displayName eq 'sent Items'

Reponse :

[{"error":{"code":"MailboxNotEnabledForRESTAPI","message":"The mailbox is either inactive, soft-deleted, or is hosted on-premise.","innerError":{"date":"2022-06-09T10:27:07","request-id":"xxx...","client-request-id":"xxx..."}}}]

Questions:

What could be the possible reason for this error?
Is there any alternate way that we can give the access from Azure ad portal through App set up?

Please tell us any possible solution, if possible.

Thanks!!!!

Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Sheena-MSFT 1,736 Reputation points
    2022-06-10T15:02:52.427+00:00

    Hi @Markandey Kumar ,

    Please find the related post microsoft-graph-api-throws-the-mailbox-is-either-i.html

    Refer :mailboxnotenabledforrestapi-warning-occurs

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

    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.