question

JasonRea-8136 avatar image
0 Votes"
JasonRea-8136 asked JasonRea-8136 commented

Cannot update Bookings appointment to have additional customers

Microsoft Graph API v1 for Bookings states that you can update the customers field for an existing appointment
https://docs.microsoft.com/en-us/graph/api/bookingappointment-update?view=graph-rest-1.0&tabs=csharp

Doing so results in a vague exception (Microsoft.Graph.ServiceException)

Message: An error has occurred.
Inner error:
    AdditionalData:
    date: 2022-01-14T18:04:47
    request-id: 42a99059-024a-4f10-9396-4bae19925fae
    client-request-id: 42a99059-024a-4f10-9396-4bae19925fae
ClientRequestId: 42a99059-024a-4f10-9396-4bae19925fae


The code I'm using to do this is very simple. Please advise.

var updatedAppointment = await _graphServiceClient.Solutions
                        .BookingBusinesses["bookings-business-id"]
                        .Appointments["existing-appointment-id"]
                        .Request()
                        .UpdateAsync(new BookingAppointment
                        {
                              Customers = new List<BookingCustomerInformation>
                              {
                                    new BookingCustomerInformation { CustomerId = "customer-1-id" },
                                    new BookingCustomerInformation { CustomerId = "customer-im-trying-to-add-id" }
                              }
                         });

microsoft-graph-customer-booking
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SrinivasaRaoDarnaMSFT-7657 avatar image
0 Votes"
SrinivasaRaoDarnaMSFT-7657 answered JasonRea-8136 commented

Hi @JasonRea-8136 ,

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.

Hope this helps.

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'm just going to ditch the tool altogether. We've had to come up with so many work-arounds at this point and the documentation is poor.

0 Votes 0 ·