How to filter CalendarView on customers data

Steve 21 Reputation points
2023-09-03T19:13:06.55+00:00

Hi, I'm trying to obtain a list of all appointments of a customer.

Running on Graph Explorer https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contoso@M365x214355.onmicrosoft.com/calendarView?start=2023-09-09&end=2023-10-09&$filter=customers/any(c:c/emailAddress+eq+'test@gmail.com') I receive the following error:

{
    "error": {
        "code": "BadRequest",
        "message": "Invalid filter clause: Could not find a property named 'emailAddress' on type 'microsoft.graph.bookingCustomerInformationBase'.",
        "innerError": {
            "date": "2023-09-03T19:04:30",
            "request-id": "344da73e-7466-44ac-9c53-0b9909e78b58",
            "client-request-id": "344da73e-7466-44ac-9c53-0b9909e78b58"
        }
    }
}

The documentation https://learn.microsoft.com/en-us/graph/api/bookingbusiness-list-calendarview?view=graph-rest-1.0&tabs=http#query-parameters says that only $count and $expand are supported by filtering on one of the properties of the main bookingAppointment object, like selfServiceAppointmentId seems to work.

How can I retrieve a list of booking appointments by customer email? Thanks in advance.

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

1 answer

Sort by: Most helpful
  1. msft-gu 1,275 Reputation points
    2023-09-07T21:59:17.21+00:00

    Hi Steve,

    Thank you for your question. Yes, the documentation states that only $count and $expand are supported on the filtering and it may not be possible to use other query param.

    User's image

    Reference: https://learn.microsoft.com/en-us/graph/api/bookingbusiness-list-calendarview?view=graph-rest-1.0&tabs=http#query-parameters

    0 comments No comments