Forum Discussion

ERod's avatar
ERod
Copper Contributor
Jan 06, 2026

MS Bookings

Hi everyone,

We’ve been stumped on this for a while and even Microsoft Support couldn't provide a clear solution. Our tenant is cluttered with MS Shared Bookings calendars that are either inactive or were created as one-off tests.

Does anyone have a PowerShell script or a specific Graph query that can pull activity for all MS Bookings calendars in the tenant within a 90-day window? As Global Admins, we need to identify which ones are safe to decommission.

Any advice would be greatly appreciated!

4 Replies

  • Scott_Schnoll's avatar
    Scott_Schnoll
    Brass Contributor

    AFAIK, there is no single Graph endpoint today that gives you “last activity” for all Microsoft Bookings calendars tenant-wide, but I believe you can get very close with a Graph + PowerShell approach that can be used for cleanup.

    If I read your post correctly, you want to enumerate all Bookings in the tenant and then query appointments in the last 90 days and then flag those with zero activity as candidates for decommissioning.

    I think this should do what you want:

    Connect-MgGraph -Scopes "Bookings.Read.All","User.Read.All"
    $businesses = Get-MgBookingBusiness -All
    $cutoff = (Get-Date).AddDays(-90)
    
    $results = foreach ($biz in $businesses) {
        try {
            $appointments = Get-MgBookingBusinessAppointment `
                -BookingBusinessId $biz.Id `
                -Filter "start/dateTime ge '$($cutoff.ToString("yyyy-MM-ddTHH:mm:ssZ"))'" `
                -Top 1
    
            [PSCustomObject]@{
                BusinessName = $biz.DisplayName
                BusinessEmail = $biz.Email
                Created      = $biz.CreatedDateTime
                HasActivity  = ($appointments.Count -gt 0)
            }
        }
        catch {
            # Orphaned and test businesses will likely error
            [PSCustomObject]@{
                BusinessName = $biz.DisplayName
                BusinessEmail = $biz.Email
                Created      = $biz.CreatedDateTime
                HasActivity  = $false
            }
        }
    }
    
    $results

    You might also want to check the shared mailboxes used by Bookings, which can also be an indicator of activity. This script can help you do that.

    Connect-ExchangeOnline
    Get-Mailbox -RecipientTypeDetails SharedMailbox | Where-Object {$_.DisplayName -like "*Bookings*"} | Get-MailboxStatistics | Select DisplayName, LastLogonTime

    No appointments + no mailbox logon in 90 days is a strong candidate for decommission. If the mailbox is active but there are no appointments, you can review it manually.

    Hope this helps!

  • AriasJose's avatar
    AriasJose
    Brass Contributor

    https://github.com/MicrosoftDocs/microsoft-365-docs/blob/public/microsoft-365/bookings/best-practices-shared-bookings.md#best-practices-for-using-shared-bookings

     

  • AriasJose's avatar
    AriasJose
    Brass Contributor

    We’ve seen this come up in larger tenants with lots of “test” or inactive Shared Bookings calendars. A practical approach is to combine Microsoft Graph Bookings data with Exchange Online mailbox telemetry to determine true inactivity over a 90‑day window, then decommission with a short, well‑communicated grace period.

    Recommended steps (high level):

    Inventory Bookings businesses and check appointment activity within the last 90 days to identify calendars with zero usage.

    Corroborate with scheduling mailbox signals (e.g., last logon or item growth) to avoid false positives from seasonal services.

    Governance: notify owners, set an opt‑out deadline, and remove or disable unused calendars; keep an exception list for seasonal departments.

     

    References:

    Turn Bookings on or off (tenant‑level controls, scoping, and governance):

    https://learn.microsoft.com/en-us/microsoft-365/bookings/turn-bookings-on-or-off?view=o365-worldwide

    Bookings in Outlook (behavior and user experience differences that affect monitoring):

    https://learn.microsoft.com/en-us/microsoft-365/bookings/bookings-in-outlook?view=o365-worldwide

    Microsoft Graph Bookings module (endpoints and cmdlets to enumerate businesses and query appointments):

    https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.bookings/?view=graph-powershell-1.0

     

    After you identify candidates with no activity in the 90‑day window, send a final notice to owners with a removal date. Anything without a response by that date can be safely decommissioned, while documented exceptions remain active.

  • C_the_S's avatar
    C_the_S
    Bronze Contributor

    Send out an all user email that states, "IT will be removing all Bookings calendars unless you notify us by X date. Please note if we don't hear back from you we will conclude you no longer need the calendar and it will be permanently deleted after that date." 

    Making the users responsible for their items is a good thing, not bad.

Resources