In the request body, supply the values for relevant fields that should be updated. Existing properties that aren't included in the request body maintains their previous values or are recalculated based on changes to other property values. For best performance, you shouldn't include existing values that haven't changed.
Property
Type
Description
name
String
The group name.
Response
If successful, this method returns a 200 OK response code and updated calendarGroup object in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new CalendarGroup
{
Name = "name-value",
};
var result = await graphClient.Me.CalendarGroups["{calendarGroup-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc users calendar-groups patch --user-id {user-id} --calendar-group-id {calendarGroup-id} --body '{\
"name": "name-value"\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new CalendarGroup();
$requestBody->setName('name-value');
$result = $graphServiceClient->me()->calendarGroups()->byCalendarGroupId('calendarGroup-id')->patch($requestBody)->wait();
Import-Module Microsoft.Graph.Calendar
$params = @{
name = "name-value"
}
# A UPN can also be used as -UserId.
Update-MgUserCalendarGroup -UserId $userId -CalendarGroupId $calendarGroupId -BodyParameter $params
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = CalendarGroup(
name = "name-value",
)
result = await graph_client.me.calendar_groups.by_calendar_group_id('calendarGroup-id').patch(body = request_body)