How To Modify the "All Day" Property for a bookingAppointment

Justin 1 Reputation point
2024-05-10T17:10:29.7833333+00:00

A bookingAppointment object appears to not have an "All Day" property in the documentation. This property clearly exists however, as verified by the option within Bookings to toggle it.

Moreover, if we read the bookingAppointment object instead as a calendarEvent object as the services are somehow related on the backend, the value is pulled and readable. This is great until we wish to modify the value.

Currently there is no documented way to modify isAllDay within the bookingAppointment. Moreover, Microsoft appears to have disabled the ability to edit this value through the calendar API, as it now throws a BAD REQUEST exception (though other fields may still be edited).

Is there anyway to edit this property through the API?

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

1 answer

Sort by: Most helpful
  1. Hitesh Pachipulusu - MSFT 80 Reputation points Microsoft Vendor
    2024-05-14T21:09:15.9966667+00:00

    Hello @Justin,

    According to the documentation https://learn.microsoft.com/en-us/graph/api/bookingappointment-update?view=graph-rest-1.0, we cannot modify the isAllDay parameter using bookingAppointment Graph API.

    But using calendar event API, we can modify isAllDay property.

    GRAPH API CALL - PATCH https://graph.microsoft.com/v1.0/me/calendar/events/{EventID} Request Body: { "isAllDay": true, "start": { "dateTime": "2024-05-16T00:00:00.0000000", "timeZone": "UTC" }, "end": { "dateTime": "2024-05-17T00:00:00.0000000", "timeZone": "UTC" } }

    Please check the documentation. https://learn.microsoft.com/en-us/graph/api/event-update?view=graph-rest-1.0&tabs=http

    I am able to set the isAllDay to true using Graph Explorer. In request body provide start and end properties along with isAllDay property. Please see the below screenshot.

    User's image

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

    0 comments No comments