Get-MgUserCalendar is a Microsoft Graph PowerShell cmdlet used to retrieve calendar objects from a user’s mailbox. It allows administrators to list all calendars or fetch details of a specific calendar associated with a Microsoft 365 user.
Try the M365Corner Microsoft 365 Reporting Tool — your DIY pack with 20+ out-of-the-box M365 reports for Users, Groups, and Teams.
This cmdlet is useful for:
It enables PowerShell-based visibility into user calendar configurations without manual mailbox access.
Before running this cmdlet, ensure you are connected to Microsoft Graph with the required permissions:
Connect-MgGraph -Scopes "Calendars.Read"
Basic syntax:
Get-MgUserCalendar -UserId <String> [-CalendarId <String>] [-Filter <String>]
Use this cmdlet to retrieve all calendars for a user, fetch a single calendar by ID, or filter calendars based on properties.
Get-MgUserCalendar -UserId "john.doe@contoso.com" -All
This command fetches all calendars that belong to the specified user.
Get-MgUserCalendar -UserId "john.doe@contoso.com" -CalendarId "AAMkAGI2AAAxZDI3LTQzZGYtNDMzZS05NzA2LTYwOTk5ZTVhN2I4YQBGAAAAAADJW7MCAp_Ob2JrAK3w_8QHBgA9DxCtv2LSQJ-KHyt7AAAAAAEQAAC7c6jIHwQjQZMIm50isAAQGo_9_AAA="
This retrieves detailed information for a specific calendar.
Get-MgUserCalendar -UserId "john.doe@contoso.com" -Filter "name eq 'Birthdays'"
This command returns the calendar named Birthdays, if present.
$calendars = Get-MgUserCalendar -UserId "john.doe@contoso.com" -All
$calendars | Export-Csv -Path "C:\Reports\UserCalendars.csv" -NoTypeInformation
This script exports all user calendar data to a CSV file for reporting or analysis.
| Key Point | Details |
| Cmdlet Name | Get-MgUserCalendar |
| Purpose | Retrieves calendar objects from a user mailbox |
| Required Scope | Calendars.Read |
| Key Parameters | UserId, CalendarId, Filter |
| Automation Benefit | Enables calendar auditing and reporting via PowerShell |
| Common Use Case | Listing, filtering, or exporting user calendars |
Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.
Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.
© Your Site Name. All Rights Reserved. Design by HTML Codex