MailboxNotEnabledForRESTAPI - Microsoft Graph API integration with HMA Enabled on-premise server

1.6k views Asked by At

We had integrated our application with Microsoft Graph API enabling user to access their outlook through our application. The integration works fine with office365 users but having intermittent issues with users in on-premise server.

Initially after enabling HMA in on-premise server the integration started working, but for past two weeks we are facing issue with the integration and receiving error message as below.

HTTP error: 404
Error code: MailboxNotEnabledForRESTAPI or MailboxNotSupportedForRESTAPI
Error message: "REST API is not yet supported for this mailbox."

But we had not made any recent changes to server or Graph API access. Surprisingly, it started to working today as this was sporadic we need assistance in understanding the issue. Any help is greatly appreciated.

Update: We started seeing the error again early today and we have captured the following log information.

{
    "error": {
    "code": "ResourceNotFound",
    "message": "Resource could not be discovered.",
    "innerError": {
      "date": "2020-10-30T08:03:20",
      "request-id": "c1f461d7-0757-4a54-a727-58cb0da7fe5d",
      "client-request-id": "c1f461d7-0757-4a54-a727-58cb0da7fe5d"
    }
  }
}
1

There are 1 answers

8
Cyril Iselin On

This post is not an answer :-(, but should provide more details because we are running into the same issue.

To isolate the problem, we only using postman. We are not able to create a "working token" with postman. We tried like every possible O-Auth flow :-). When we use the token generated by "Graph Playground" requests are working.

What means "working token":

Request to: https://graph.microsoft.com/v1.0/me -> GP works | PM works

Request to: https://graph.microsoft.com/v1.0/me/calendar -> GP works | PM don't work

Request to: https://graph.microsoft.com/v1.0/me/contacts > GP works | PM don't work

.....

(GP = Graph Playground // PM = Postman)

Token

On the left side we see the token created via postman. On the right side we see the token from Graph online. I can't find an important difference, you can ? :-)

JWT TOKEN GRAPH