Forum Discussion
Internal Server Error when creating an appointment with isLocationOnline: true
Since last week we are experiencing an issue with creating booking appointments when isLocationOnline is set to true. The booking is created in MS Bookings but the Graph API returns a 500 Internal Server Error without any further details and the customer doesn't receive the confirmation email, only the reminders. With isLocationOnline set to false the Graph API returns a proper booking appointment response and the customer receives the confirmation email. But no teams link is being created, which is the whole point.
We have a test environment where it still works with the same payload. We've double checked all Business and Service rules and made sure the service linked to the appointment is set up to allow online sessions. The strange thing is that Microsoft's own service booking page also returns an Internet Server Error when creating an appointment through their UI.
Example request with the culprit highlighted in bold:
curl --location 'https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{businessId}/appointments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data-raw '{
"@odata.type": "#microsoft.graph.bookingAppointment",
"customerTimeZone": "W. Europe Standard Time",
"endDateTime": {
"@odata.type": "#microsoft.graph.dateTimeTimeZone",
"dateTime": "2025-02-28T13:45:00.000Z",
"timeZone": "UTC"
},
"isLocationOnline": true,
"optOutOfCustomerEmail": false,
"postBuffer": "PT15M",
"preBuffer": "PT0S",
"email address removed for privacy reasons": "#Collection(microsoft.graph.bookingReminder)",
"reminders": [
{
"offset": "-PT1S",
"recipients": "customer",
"message": "Reminder 1"
},
{
"offset": "P1D",
"recipients": "customer",
"message": "Reminder 2"
},
{
"offset": "P2D",
"recipients": "staff",
"message": "Reminder3 "
}
],
"serviceId": "{serviceId}",
"staffMemberIds": [
"{staffMemberId}"
],
"startDateTime": {
"@odata.type": "#microsoft.graph.dateTimeTimeZone",
"dateTime": "2025-02-28T12:45:00.000Z",
"timeZone": "UTC"
},
"maximumAttendeesCount": 1,
"filledAttendeesCount": 1,
"email address removed for privacy reasons": "#Collection(microsoft.graph.bookingCustomerInformation)",
"customers": [
{
"@odata.type": "#microsoft.graph.bookingCustomerInformation",
"name": "-",
"emailAddress": "email address removed for privacy reasons",
"timeZone": "W. Europe Standard Time"
}
]
}'