Note the following behaviors or recommendations when updating the corresponding properties:
attendees property and meeting updates
An event update that includes only the attendees property in the request body sends a meeting update to only the attendees that have changed.
An event update that removes an attendee specified as a member of a distribution list sends a meeting update to all the attendees.
body property and online meetings
Before updating the body of an event that has been set up as an online meeting, be sure to first get the body property, apply the appropriate changes to the content, and preserve the meeting blob for online meeting. Inadvertently removing the meeting blob from the body would disable meeting online.
end and start properties and their time zones
When updating the time zone of the start or end time of an event, first find the supported time zones to make sure you set only time zones that have been configured for the user's mailbox server.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
In the request body, supply only the values for properties to update. Existing properties that aren't included in the request body maintain their previous values or are recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
The locations where the event is held or attended from. The location and locations properties always correspond with each other. If you update the location property, any prior locations in the locations collection would be removed and replaced by the new location value.
onlineMeetingProvider
onlineMeetingProviderType
Represents the online meeting service provider. The possible values are teamsForBusiness, skypeForBusiness, and skypeForConsumer. Optional.
The number of minutes before the event start time that the reminder alert occurs.
responseRequested
Boolean
Set to true if the sender would like a response when the event is accepted or declined.
sensitivity
String
The possible values are: normal, personal, private, confidential.
showAs
String
The status to show. The possible values are: free, tentative, busy, oof, workingElsewhere, unknown.
start
DateTimeTimeZone
The start date, time, and time zone of the event.
subject
String
The text of the event's subject line.
Because the event resource supports extensions, you can use the PATCH operation to
add, update, or delete your own app-specific data in custom properties of an extension in an existing event instance.
If the event you're updating is the master event of a recurring series, contains multiple attendees, and has instances that have been updated separately, multiple notification emails will be sent out: one for the master series and one per instance that has been updated.
Response
If successful, this method returns a 200 OK response code and updated event object in the response body.
Note: This method can return an HTTP 400 Bad Request response with an error code of ErrorOccurrenceCrossingBoundary and the following error message: Modified occurrence is crossing or overlapping adjacent occurrence. This indicates that the update violates the following Outlook restriction on recurrence exceptions: an occurrence cannot be moved to or before the day of the previous occurrence, and cannot be moved to or after the day of the following occurrence.
// 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)