Bookings REST API no customerId/ customername

Werk Waterman 21 Reputation points
2020-06-05T11:54:52.367+00:00

We use the Bookings app to reserve workplaces in the office.

If we create an appointment by the reservation form and we make a request off the appointments by the REST API, we will see a customer id equal to null.

--> GET https://graph.microsoft.com/beta/bookingBusinesses/{<!-- -->{id}}/appointments
(https://learn.microsoft.com/en-us/graph/api/bookingbusiness-list-appointments?view=graph-rest-beta&tabs=http)

results:
=> "customerId": null,
"customerName": null,

Can anyone tell me how we can solve this, we need the customerid and name?

Microsoft Entra
{count} votes

Accepted answer
  1. Saurabh Sharma 23,816 Reputation points Microsoft Employee
    2020-06-08T22:48:29.657+00:00

    @WerkWaterman-0821 It is weird behavior for you. I have created new service using api, then created new appointment using Graph Sample from here and I am able to get customerid. Can you please try executing the above examples. Also, compared your's vs this example if you are passing same attributes.
    9372-booking-api-appointments.png

    I this doesn't work I suggest you to please post this on Microsoft Graph support forum to get help from experts.

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Werk Waterman 21 Reputation points
    2020-06-07T10:32:02.433+00:00

    Hi SaurabhSharma,

    The null value is for both, new and existing customers. We created 2 custom services with it's own serviceId.

    For now we use the 'Create booking Appointment' with a simple site, outside Office365, but that's not how we planed to do it.

    0 comments No comments

  2. Werk Waterman 21 Reputation points
    2020-06-09T06:43:24.54+00:00

    Hi SaurabhSharma-msft,

    No problems when i post an appointment by the Graph Explorer, the customerId and customerName is set. This is our current solution.
    The problem is when i use the form (see: image).
    I will try later to create a new service, maybe we did something wrong by creating the services, i was hoping for a wrong setting.

    thanks.

    9405-example.png

    0 comments No comments

  3. Saurabh Sharma 23,816 Reputation points Microsoft Employee
    2020-06-09T20:08:52.987+00:00

    @WerkWaterman-0821 I have tried using the booking page as well with valid and invalid emails but customer id and customer name is getting generated in all scenario's. 9643-booking-api-appointments-2.png

    What all settings you have selected while publishing the booking URL from bookings page like language, time zone etc. ?

    [2]: https://developer.microsoft.com/en-us/graph/support

    0 comments No comments

  4. Werk Waterman 21 Reputation points
    2020-06-23T11:29:18.72+00:00

    Hi @SaurabhSharma-msft,

    I finally had the time to create a new service and the problem is solved. I don't now what causing the problem by the existing services.

    The issue is solved for now.

    Thanks


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.