What are the required fields? Unknown Error 400 Bad Request @ POST /solutions/bookingBusinesses/{id}/appointments

Ryan Fincham Parkology 5 Reputation points
2023-02-06T20:09:41.9133333+00:00

I am able to GET at this endpoint using the same application permissions and the same token. I am also able to POST to this endpoint on Graph explorer. Whenever I try to POST using an application-generated token, I receive this error:

{
    "error": {
        "code": "UnknownError",
        "message": "",
        "innerError": {
            "date": "2023-02-06T19:43:30",
            "request-id": "b88aed12-df52-45a4-8657-0eb3d16fa280",
            "client-request-id": "b88aed12-df52-45a4-8657-0eb3d16fa280"
        }
    }
}

What constitutes a valid request? The sample code works on Graph explorer but doesn't work when using an application-generated token.

I saw this post where @Srinivasa Rao Darna said, "Currently there appears to be a issue with update appointment for call to pass, all the properties(except location) in the customers array are required."

Thinking something similar may be the issue, I tried this suggestion using all customer and appointment fields, unfortunately, without success.

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

2 answers

Sort by: Most helpful
  1. Bhanu Kiran 3,526 Reputation points
    2023-02-08T09:07:32.13+00:00

    Hi @Ryan Fincham Parkology ,

    I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from
    http://aad.portal.azure.com/ or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


  2. Ryan Fincham 0 Reputation points
    2023-04-01T00:41:16.05+00:00

    Reporting back!

    After working with the Graph Dev team (Bonny specifically - who is fantastic!), my problem was an actual bug in the system, which they promptly fixed. However, you must also be careful to follow all Booking Business policies AND Service Booking policies if you are using Application permissions. I had another node.js timezone issue that I resolved. I could not figure out how to convert the UTC timezone to local time but ended up being successful after a few weeks of bashing my head against the wall. To whoever is reading this - please message me to get help if needed.

    This is the final case summary:

    Issue Statement:

    Unknown Error 400 Bad Request @ POST /solutions/bookingBusinesses

    Cause:

    Product issue on the API

    Resolution:

    400 bad request:

    When you try creating Booking Appointment using Application permission, if you encounter 400 bad request – Check the Booking business configuration and Policies. For example, if the booking service is configured to take 1hr appointment and you try creating a 2 hr appointment, it will fail with 400 bad request. This is expected for app permissions. To fix it – make sure the Booking Business and Booking Service settings are honored.

    500 internal Server error:

    Even after you fix 400 bad requests, it will still cause another error – 500 Internal server error. This was a cosmetic error on the service (though it errors out, respective appointment gets created in the bookings calendar). This issue is fixed with a code change.

    0 comments No comments