New/Update-MgUserEvent only updates Subject and ShowAs

Edwin J. Wensley 1 Reputation point
2025-04-15T18:03:41.5866667+00:00

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).

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,477 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.