bookingsBusiness: get appointment does not contain customer if booked through public page

Alexander Timmermans 11 Reputation points
2022-11-17T14:47:12.627+00:00

How to reproduce the issue:

  1. Create a MS Booking calendar. Set it up and create a service and add staff
  2. Book an appointment - inside the booking calendar by clicking on the "New booking" button inside the MS Booking calendar
  3. Go to the public booking page (URL to be found on menu item "Booking Page")
  4. Query graphAPI for list of appointments with https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{id}/appointments

In this list you will find the two appointment just created. If you look at the data you will see that there is indeed customer data available for the first appointment but not for the second one created in the public booking page.

In the first one you get an answer containing customer data like:

            "customers": [  
                {  
                    "@odata.type": "#microsoft.graph.bookingCustomerInformation",  
                    "customerId": "XYZXYZYX-YZXY-ZXYZ-XYZX-XYZXYZXYZXYZ",  
                    "name": "****",  
                    "emailAddress": "*****@*****.***",  
                    "phone": "*****",  
                    "timeZone": "",  
                    "notes": "",  
                    "location": null,  
                    "customQuestionAnswers": []  
                }  
            ]  

And for the second one:

        "customers": [  
            {  
                "@odata.type": "#microsoft.graph.bookingCustomerInformation",  
                "customerId": "XYZXYZYX-YZXY-ZXYZ-XYZX-XYZXYZXYZXYZ",  
                "name": "",  
                "emailAddress": "",  
                "phone": "",  
                "timeZone": "",  
                "notes": "",  
                "location": null,  
                "customQuestionAnswers": []  
            }  
        ]  

So customer data is missing if you book an appointment through the public booking page. The customer data can be retrieved from the UI but not through the GraphAPI.

So the customer data is completely missing. Now you can argue I should try, as a workaround, to retrieve the customer through the GraphAPI separately using the ID like described here: https://learn.microsoft.com/en-us/graph/api/bookingbusiness-list-customers?view=graph-rest-1.0
But you will find that this does not work, see here: https://github.com/microsoftgraph/microsoft-graph-docs/issues/15647

Right now the GraphAPI for appointment scheduling is not working reliable making it very hard to build products around it.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,409 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,711 Reputation points Microsoft Vendor
    2022-11-17T15:36:13.087+00:00

    Hello @Alexander Timmermans ,

    Thanks for reaching Microsoft Q&A forum!

    bookingbusiness-list-appointments by design excludes customers information (collection) to provide better performance to Graph call, considering size of the data being sent in response body.

    Consider bookingappointment-get, which will get a specified appointment with appointment-id.

    GET https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/{bookingBusiness-id}/appointments/{appointment-id}  
    

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