We are using the Graph API (both via REST API and the SDK) to manage appointments in an MS Bookings calendar. When creating an appointment using a POST request and specifying isLocationOnline
to "true", the appointment in the calendar gets successfully created with an embedded Teams meeting link. We are also defining some metadata within the serviceNotes
of the appointment.
Now, we are trying to perform an update operation using a PATCH request, and we've observed that in the below scenarios the Teams meeting is removed after performing the update:
- Request body contains only
serviceNotes
curl --location --request PATCH 'https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{Business}/appointments/{AppointmentID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {BearerToken}' \
--data-raw '{
"@odata.type": "#microsoft.graph.bookingAppointment",
"serviceNotes": "Update notes"
}'
- Request body contains only
serviceNotes
andisLocationOnline
curl --location --request PATCH 'https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{Business}/appointments/{AppointmentID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {BearerToken}' \
--data-raw '{
"@odata.type": "#microsoft.graph.bookingAppointment",
"isLocationOnline": true,
"serviceNotes": "Update notes"
}'
- Request body contains only
startDateTime
,endDateTime
andserviceNotes
curl --location --request PATCH 'https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{Business}/appointments/{AppointmentID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {BearerToken}' \
--data-raw '{
"@odata.type": "#microsoft.graph.bookingAppointment",
"startDateTime": {
"@odata.type": "#microsoft.graph.dateTimeTimeZone",
"dateTime": "2023-06-02T10:30:00.0000000+00:00",
"timeZone": "UTC"
},
"endDateTime": {
"@odata.type": "#microsoft.graph.dateTimeTimeZone",
"dateTime": "2023-06-02T11:30:00.0000000+00:00",
"timeZone": "UTC"
},
"serviceNotes": "Update notes"
}'
In all the above cases, the Teams meeting is lost following the update, and it seems it happens when we touch the serviceNotes
. The below resources mention similar issues with the Graph's Calendars API where on updating the event, the Teams meeting no longer exists.
- Microsoft team link is not appearing for alternate update calendar events
- Updating event via MS Graph API removing Join Button in the event
The recommended workaround is to perform an update on the Calendar event without updating the body, however, to do so would mean that the "Calendars.ReadWrite" permission would be required first to be granted, and this permission exposes all the calendars in the organisation (permissions reference).
A dirty workaround we were thinking of is to perform a cancel operation before re-creating the appointment. Is there a cleaner alternative to this issue which sits solely within the realm of MS Bookings?