Microsoft Bookings is a scheduling tool within Microsoft 365 that allows businesses to manage appointments. The Get-MgBookingBusinessCalendarView
cmdlet in Microsoft Graph PowerShell helps retrieve the calendar view for a specified booking business (containing the booking appointment IDs) within a given date range.
Get-MgBookingBusinessCalendarView -BookingBusinessId <String> -Start <DateTime> -End <DateTime>
Parameters
Get-MgBookingBusinessCalendarView -BookingBusinessId "Skyhigheducationservice@7xh7fj.onmicrosoft.com" -Start "2024-06-30T00:00:00Z" -End "2024-12-10T00:00:00Z"
Get-MgBookingBusinessCalendarView
Get-MgBookingBusiness | Select-Object Id, DisplayName
-Top
and -Skip
for paginated results.Error | Cause | Solution |
Invalid Authentication Token | The session might be expired, or the user lacks permissions. | Run Connect-MgGraph -Scopes "Booking.Read.All" to authenticate and ensure the right permissions are granted. Get-MgApplication . |
Resource Not Found | Incorrect Booking Business ID provided | Verify the Booking Business ID using Get-MgBookingBusiness before executing the cmdlet. |
Invalid Date Format | The date format provided is incorrect. | Ensure the date is in ISO 8601 format, e.g., 2024-06-30T00:00:00Z. |
The Get-MgBookingBusinessCalendarView cmdlet is a useful tool for retrieving booking schedules for a specific business in Microsoft Bookings. By properly using this cmdlet, administrators can analyze appointment trends, staff workload, and business availability efficiently. Ensuring correct parameter values and authentication will help avoid common errors when executing this cmdlet.
Try it out in your environment and customize it based on your requirements.
Let us know if you found this useful by writing to us @ m365corner@gmail.com