Microsoft graph API for appointments not working

Guna Shankar Kalla 20 Reputation points
2024-09-25T09:26:07.4133333+00:00

I have tried to use a POST request for booking interview using "https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/<service-id>/appointments". but it thowed a Internal Server Error with error code "UnknownError".

for your reference "request-id":"7fc28ac3-2a6a-463f-8151-1bd360dabaa7"

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,004 questions
0 comments No comments
{count} votes

Accepted answer
  1. Hitesh Pachipulusu - MSFT 1,985 Reputation points Microsoft Vendor
    2024-09-25T11:44:06.0733333+00:00

    Hello Guna Shankar Kalla,

    Thank you for reaching out to Microsoft Support!

    It sounds frustrating to encounter an error like that. The “Internal Server Error” with the “UnknownError” code can be tricky to diagnose, but here are a few steps you can take to troubleshoot:

    1. Check the Request Format: Ensure that your POST request is correctly formatted. The body of the request should include all required fields for creating a booking appointment. In documentation, its mentioned start and end parameters in request body but we should use startdatetime and enddatetime parameters. Also, please verify you have provided valid customer details, service-id, staffmemberIds and customerId. You can verify all these details by running below Graph API.
         GET https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{id}
      
    2. If you have created the bookingpage using Graph API, please verify in UI whether it has been created or not.

    I have tested the API locally and able to create a new appointment. Please check below screenshot.

    image (29)

    Hope this helps.

    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.