Hello tk_kop,
Thank you for reaching out to Microsoft Support!
To retrieve the properties you listed using the Get-MgUserCalendarView
command, you need the Calendars.Read
or Calendars.Read.Shared
scope, depending on whether you are accessing your own calendar or a shared calendar. These scopes allow you to read calendar events and their details.
Here’s an example of how you might structure the command to include the properties you mentioned:
Connect-MgGraph -Scopes "Calendars.Read","Calendars.Read.Shared"
$view=Get-MgUserCalendarView -UserId "user@example.com" -StartDateTime "2024-09-01T00:00:00Z" -EndDateTime "2024-09-30T23:59:59Z"
$view.start
$view.end
$view.organizer
$view.subject
$view.isAllDay
Make sure to replace "user@example.com"
with the actual user ID and adjust the date range as needed.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.