New/Update-MgUserEvent only updates Subject and ShowAs
Here's a portion of the code to create a new calendar event:
Connect-MgGraph -TenantId $TenantId -ClientId $ClientId -CertificateThumbprint $Thumbprint
$User = Get-MgUser -UserId "******@contoso.com"
$startDateTime = @{
DateTime = "2025-04-15T14:00:00"
TimeZone = "Eastern Standard Time"
}
$endDateTime = @{
DateTime = "2025-04-15T15:00:00"
TimeZone = "Eastern Standard Time"
}
$NewEvent = @{
Start = $startDateTime
End = $endDateTime
Subject = "Sample Test Event"
}
$createEvent = New-MgUserEvent -UserId $User.Id -BodyParameter $NewEvent
This creates a new calendar event but not using the correct time; it creates a 30-minute event at the next 30-minute block (e.g., at 1:44, it will create a 2:00-2:30 event). Similarly, when I use Update-MgUserEvent, it only changes the subject regardless of any other properties I request to change. I tested updating most of the fields, and the only ones that would change were Subject and ShowAs (though I don't care about changing the value for ShowAs). Connect-MgGraph app permissions are Calendars.Read, Calendars.ReadBasic.All, Calendars.ReadWrite, and User.Read.All. No errors are reported; it just doesn't create or update anything except for the Subject (and ShowAs).