Get-MgUserCalendarEvent is a Microsoft Graph PowerShell cmdlet used to retrieve events from a specific calendar in a user’s mailbox. It allows administrators to list meetings, appointments, and scheduled events stored in Microsoft 365 calendars.
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 provides detailed event metadata such as start/end time, attendees, organizer, and timestamps, making it ideal for PowerShell-driven reporting.
Before running this cmdlet, connect to Microsoft Graph with appropriate permissions:
Connect-MgGraph -Scopes "Calendars.Read"
Basic syntax:
Get-MgUserCalendarEvent -UserId <String> -CalendarId <String>
Use this cmdlet to retrieve all events from a specific user calendar. You can further refine results using filtering or export options.
Get-MgUserCalendarEvent -UserId "user@example.com" -CalendarId "AAMkAGIAAA"
This command retrieves all calendar events from the specified calendar of the user. Use Get-MgUser to obtain the User ID or UserPrincipalName.
Get-MgUserCalendarEvent -UserId "user@example.com" -CalendarId "AAMkAGIAAA" |
Export-Csv -Path "C:\Reports\CalendarEvents.csv" -NoTypeInformation
This exports all event details—such as created date-time, last modified date-time, and attendee information—to a CSV file for reporting or analysis.
$UserId = "user@domain.com"
$StartDate = "2025-03-01T00:00:00Z"
$EndDate = "2025-03-31T23:59:59Z"
Get-MgUserCalendarEvent -UserId $UserId `
-Filter "start/dateTime ge '$StartDate' and end/dateTime le '$EndDate'"
This command retrieves all calendar events that fall within the specified date range.
| Key Point | Details |
| Cmdlet Name | Get-MgUserCalendarEvent |
| Purpose | Retrieves events from a user’s calendar |
| Required Scope | Calendars.Read |
| Key Parameters | UserId, CalendarId, Filter |
| Automation Benefit | Enables calendar event reporting and auditing |
| Common Use Case | Exporting or filtering user calendar events |
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