// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new CalendarGroup
{
Name = "name-value",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
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"\
}\
'
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
CalendarGroup calendarGroup = new CalendarGroup();
calendarGroup.setName("name-value");
CalendarGroup result = graphClient.me().calendarGroups().byCalendarGroupId("{calendarGroup-id}").patch(calendarGroup);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\CalendarGroup;
$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