Booking API 'calendarView' returns an 'An error has occurred.' 500 error

Bernard Polman 15 Reputation points
2023-05-17T11:40:48.2966667+00:00

I want to retrieve the calendar events for a booking bussiness via the following GET request in Postman:

https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/KundenberatungTestBooking1@w8tlt.onmicrosoft.com/calendarView?start=2023-05-17T00:00:00Z&end=2023-05-18T23:59:59Z&$select=serviceName,staffMemberIds,startDateTime,endDateTime

However, Postman returns the following 500 error:

{
    "error": {
        "code": "",
        "message": "An error has occurred.",
        "innerError": {
            "date": "2023-05-17T11:37:56",
            "request-id": "2011a326-c174-48cc-b29e-d81515c50304",
            "client-request-id": "2011a326-c174-48cc-b29e-d81515c50304"
        }
    }
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,384 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ab-8756 800 Reputation points
    2023-05-17T14:56:19.38+00:00

    Hello Bernard Polman,
    Thank you for reaching out.
    I have doubled checked your http request, it shows everything fine. I have tested this from my end and I was able to get the results I needed. https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/XXXXX@XXXXX.com/calendarView?start=2023-05-01T00:00:00Z&end=2023-05-17T00:00:00Z&$select=serviceName,staffMemberIds,startDateTime,endDateTime

    User's image

    Please note that this end point does not support for application permissions, and I suspect that might be the root cause for your case. Here is the reference KP;- https://learn.microsoft.com/en-us/graph/api/bookingbusiness-list-calendarview?view=graph-rest-1.0#permissions
    User's image

    I am only able to reproduce the same error, when I use application permissions, but with delegate permissions, it works fine.
    Hope this helps.
    Thanks.
    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments