I'm attempting to get info on some of our resource calendars. Since this doesn't function well within the EXO Powershell, I was pointed towards the MSGraph module.
So I use these commands:
$StartDate = "2024-01-01T19:00:00-08:00"
>> $EndDate = "2024-12-31T19:00:00-08:00"
>> Get-MgUserCalendarView -UserId "xxx@xxx.xx" -All -StartDateTime $StartDate -EndDateTime $EndDate | Select-Object -Property @{Name='EventStart';Expression={ $_.Start.DateTime}},@{Name='EventEnd';Expression={ $_.End.DateTime}},Subject, BodyPreview | Export-CSV "c:\temp\xxx.csv"
And this works fine for almost every resource I have tried this on. But one set of resource mailboxes gives this as a result:
Get-MgUserCalendarView_List:
Line |
3 | Get-MgUserCalendarView -UserId "xxx@xxx.xx" -All -Star …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The specified object was not found in the store.
Status: 404 (NotFound)
ErrorCode: ErrorItemNotFound
Date:
Headers:
Cache-Control : private
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : ab43f50a-55e9-49fa-a837-aca09feba628
client-request-id : 607a9733-2835-4c51-8885-138338823e84
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"West Europe","Slice":"E","Ring":"5","ScaleUnit":"009","RoleInstance":"AM1PEPF00027CA5"}}
Date : Tue, 07 Jan 2025 15:22:11 GMT
This set of resource mailboxes are coincidentally all made at about the same time, but they were made in the same way as other resource mailboxes and are (just like the other resource mailboxes) made in our EXO environment with no links to anything on-prem.
Does anyone have any idea what is going wrong?