4
votes

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
(1) Share the Graph API call which you're calling (2) Can you share the detailed response logs (with timestamp, requestid, error info) etc? (3) Using Microsoft Graph Explorer/POSTMAN, can you try to see if you can repro the above issue or not - Dev
Yes, still trying to find a solution. Will add more details tomorrow. - Sreekanth
@Dev - Unfortunately, we could not get the logs and as I mentioned it started working for the client since couple of days ago without any changes made. If possible , can you provide what could be the possible reasons for this issue? - Sreekanth
(1) If you had the logs/timestamp & requestid then using that we can tell what might have happened. It's pretty much needed. (2) Check at your end if you did any code changes or configuration/settings at Exchange on your end (3) In addition to this, still you consider filing support ticket with Microsoft to get further assistance. - Dev
@Dev Thanks for your reply. I validated the token and I can't find any difference. Also I tried to obtain the token via postman (every flow tried :-)) with the same result. When I create a token (even with postman) I recive for some requests "MailboxNotEnabledForRESTAPI" but with the token generated from graph online it works. - Cyril Iselin

1 Answers

2
votes

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