'bookingBusinesses "Mailbox does not exist"

I'm trying to use the Microsoft Bookings API in Microsoft Graph. I've gone through the OAuth stage where I grant access and retrieve an authorization code from the token api. This works well. My issue now is that I get this response:

{
  "error": {
    "code": "ErrorInvalidOperation",
    "message": "Mailbox does not exist.",
    "innerError": {
      "request-id": "e40bf9b9-8f2b-48e9-bb37-7a9ce1794ae7",
      "date": "2020-01-27T21:28:46"
    }
  }
}

When I run the request recommended here: https://docs.microsoft.com/en-us/graph/api/resources/booking-api-overview?view=graph-rest-beta

POST https://graph.microsoft.com/beta/bookingBusinesses
Authorization: Bearer {access token}
Content-Type: application/json

{
    "displayName":"Contoso"
}

(With another displayName) I don't get what's wrong, do I need to set something up for my account or for the application in the Azure dashboard? Any help would be greatly appreciated!



Solution 1:[1]

I have experienced the same problem with our organisation using a service account, I am doing exactly the same request and receiving exactly the same result from Graph API, However, our service account has an MS A3 license with MS booking permission. We found out the reason for it, is because the service account was not granted an Exchange mailbox. And it works after we granted an exchange mailbox to the account.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 martin hui