Hi Darron,
Thank you reaching out Microsoft.
I successfully copied all events from a user's personal calendar to a group calendar using MS Graph PowerShell. Make sure to grant the following delegated permissions to retrieve a user's events and create a group calendar event:
- Calendars.Read
- Calendars.Read.Shared
- Groups.ReadWrite.All
You can use the script below after connecting to Graph PowerShell with the Connect-MgGraph command.
$userId = "EMPLOYEE_1_USER_ID"
$calendarId = "CALENDAR_ID"
$events = Get-MgUserCalendarEvent -UserId $userId -CalendarId $calendarId
$groupId = "GROUP_ID"
foreach ($event in $events) {
New-MgGroupEvent -GroupId $groupId -BodyParameter @{
Subject = $event.Subject
Start = @{
DateTime = $event.Start.DateTime
TimeZone = $event.Start.TimeZone
}
End = @{
DateTime = $event.End.DateTime
TimeZone = $event.End.TimeZone
}
Body = @{
ContentType = "HTML"
Content = $event.Body
}
Location = @{
DisplayName = $event.Location
}
Attendees = $event.Attendees
}
}
Please refer below documents:
https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.authentication/connect-mggraph?view=graph-powershell-1.0
Please check the attached screenshot of PowerShell Script which creates events in group calendar.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.