// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Event
{
OriginalStartTimeZone = "originalStartTimeZone-value",
OriginalEndTimeZone = "originalEndTimeZone-value",
ResponseStatus = new ResponseStatus
{
Response = ResponseType.None,
Time = DateTimeOffset.Parse("datetime-value"),
},
Recurrence = null,
ReminderMinutesBeforeStart = 99,
IsOnlineMeeting = true,
OnlineMeetingProvider = OnlineMeetingProviderType.TeamsForBusiness,
IsReminderOn = true,
HideAttendees = false,
Categories = new List<string>
{
"Red category",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.Events["{event-id}"].PatchAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
Event event = new Event();
event.setOriginalStartTimeZone("originalStartTimeZone-value");
event.setOriginalEndTimeZone("originalEndTimeZone-value");
ResponseStatus responseStatus = new ResponseStatus();
responseStatus.setResponse(ResponseType.None);
OffsetDateTime time = OffsetDateTime.parse("datetime-value");
responseStatus.setTime(time);
event.setResponseStatus(responseStatus);
event.setRecurrence(null);
event.setReminderMinutesBeforeStart(99);
event.setIsOnlineMeeting(true);
event.setOnlineMeetingProvider(OnlineMeetingProviderType.TeamsForBusiness);
event.setIsReminderOn(true);
event.setHideAttendees(false);
LinkedList<String> categories = new LinkedList<String>();
categories.add("Red category");
event.setCategories(categories);
Event result = graphClient.me().events().byEventId("{event-id}").patch(event);
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.event import Event
from msgraph.generated.models.response_status import ResponseStatus
from msgraph.generated.models.response_type import ResponseType
from msgraph.generated.models.online_meeting_provider_type import OnlineMeetingProviderType
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Event(
original_start_time_zone = "originalStartTimeZone-value",
original_end_time_zone = "originalEndTimeZone-value",
response_status = ResponseStatus(
response = ResponseType.None,
time = "datetime-value",
),
recurrence = None,
reminder_minutes_before_start = 99,
is_online_meeting = True,
online_meeting_provider = OnlineMeetingProviderType.TeamsForBusiness,
is_reminder_on = True,
hide_attendees = False,
categories = [
"Red category",
],
)
result = await graph_client.me.events.by_event_id('event-id').patch(request_body)