Cannot update Bookings appointment to have additional customers

Jason Rea 6 Reputation points
2022-01-14T18:19:29.513+00:00

Microsoft Graph API v1 for Bookings states that you can update the customers field for an existing appointment
https://learn.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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,654 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,696 Reputation points Microsoft Vendor
    2022-01-28T17:27:24.39+00:00

    Hi @Jason Rea ,

    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".