The number of keys specified in the URI does not match number of key properties for the resource 'microsoft.graph.bookingAppointment

Viewed 801

We are trying to use Graph APIs for Bookings application. In fact, we are customizing the C# code from the microsoft sample :

https://microsoft.github.io/bookings-samples/

We have the application registration and all the permissions configured in Azure. Using the BookingsSampleNativeConsole, we are able to query the graphService.BookingBusinesses as shown below.

var graphService = new GraphService(GraphService.ServiceRoot, () => authenticationResult.CreateAuthorizationHeader());

Unfortunately none of the other entities gets populated. So we are using the following to query the appointments:

Uri appointUri = new Uri("https://graph.microsoft.com/beta/bookingBusinesses/{id}/appointments");
  
var appointParams = new UriOperationParameter[]
 {
            new UriOperationParameter("start", "2020-08-01T00:00:00Z"),
            new UriOperationParameter("end", "2020-08-31T00:00:00Z")
        };

var resp = graphService.Execute(appointUri, "GET", appointParams);

But this call returns :

An error occurred while processing this request. ---> Microsoft.OData.Client.DataServiceClientException:

{
  "error": 
   {
    "code": "BadRequest",
    "message": "The number of keys specified in the URI does not match number of key properties for the resource 'microsoft.graph.bookingAppointment'."
   }
}

Any idea what we are missing or wrong with appointParams ? Thanks in advance.

(2)Graph APIs for Bookings has been in beta for quite sometime now. Any idea when is the probable release date for version 1.0 ?

Ajit19

0 Answers
Related