MS Entra – Calendars – Update Event

Estimated reading: 9 minutes

MS Entra – Calendars – Update Event

Update an event for a user calendar.

Action details

PropertyValue
Action labelMS Entra – Calendars – Update Event
CategoryCloudTools
Apex class and methodUpdateMSGraphEvent.updateEvent
Input typeUpdateMSGraphEvent.UpdateMSGraphEventInput
Output typeList<MSGraphEvent>
AuthorizationMicrosoft 365 connector; supported authorization depends on the endpoint and target.
Microsoft Graph requestPATCH /me/calendar/events/{eventId} or the selected user/calendar path; group event path where exposed

Prerequisites and permissions

Configure a CloudTools Connector with Connector Type set to Microsoft 365. Complete sign-in for OAuth Delegated (Authorization Code). For supported OAuth Application (Client Credentials) requests, grant application permissions and administrator consent. The identity must have access to the selected resource; directory operations can also require Microsoft Entra roles. Use Creating an Entra ID App and Integration Connectors for setup.

The action permission provider declares these alternatives. They are not cumulative requirements, not all are least privileged, and a scope can have target-specific restrictions. Check the Microsoft operation reference before selecting permissions.

Permission typeDeclared alternatives
DelegatedCalendars.ReadWrite
ApplicationCalendars.ReadWrite

Endpoints: /me/calendar/events/{event-id}; /me/calendars/{calendar-id}/events/{event-id}; /users/{idOrUserPrincipalName}/calendar/events/{event-id}; /users/{idOrUserPrincipalName}/calendars/{calendar-id}/events/{event-id}

See the Microsoft operation and permissions reference.

Inputs

InputApex fieldTypeRequiredDescription
User EmailuserEmailStringNoEmail address of the user
Event IdeventIdStringYesEvent identifier
Calendar IdcalendarIdStringNoCalendar identifier (leave empty for default calendar)
EventeventItemMSGraphEventYesEvent details
AttendeesattendeesCsvStringNoComma-delimited list of attendee email addresses.

Supply a nonempty list with a non-null first request. Graph actions process only that first request. Global inputs do not expose connectorId; subscriber Apex and Flow use CloudTools connector selection. Use Microsoft Graph resource IDs or the specifically documented user identifier, and resolve dynamic values before invocation.

Event fields (MSGraphEvent)

FieldApex fieldTypeRequiredDescription
ididStringNoMapped drive item property; populated only when returned and supported by the resource.
odataEtagodataEtagStringNoMapped drive item property; populated only when returned and supported by the resource.
subjectsubjectStringNoMapped drive item property; populated only when returned and supported by the resource.
bodyPreviewbodyPreviewStringNoMapped drive item property; populated only when returned and supported by the resource.
bodybodyMSGraphEventBodyNoMapped drive item property; populated only when returned and supported by the resource.
startTimestartTimeMSGraphDateTimeTimeZoneNoMapped drive item property; populated only when returned and supported by the resource.
endTimeendTimeMSGraphDateTimeTimeZoneNoMapped drive item property; populated only when returned and supported by the resource.
originalStartTimeZoneoriginalStartTimeZoneStringNoMapped drive item property; populated only when returned and supported by the resource.
originalEndTimeZoneoriginalEndTimeZoneStringNoMapped drive item property; populated only when returned and supported by the resource.
locationlocationMSGraphEventLocationNoMapped drive item property; populated only when returned and supported by the resource.
isAllDayisAllDayBooleanNoMapped drive item property; populated only when returned and supported by the resource.
showAsshowAsStringNoMapped drive item property; populated only when returned and supported by the resource.
isCancelledisCancelledBooleanNoMapped drive item property; populated only when returned and supported by the resource.
isOrganizerisOrganizerBooleanNoMapped drive item property; populated only when returned and supported by the resource.
importanceimportanceStringNoMapped drive item property; populated only when returned and supported by the resource.
sensitivitysensitivityStringNoMapped drive item property; populated only when returned and supported by the resource.
categoriescategoriesList<String>NoMapped drive item property; populated only when returned and supported by the resource.
createdDateTimecreatedDateTimeStringNoMapped drive item property; populated only when returned and supported by the resource.
lastModifiedDateTimelastModifiedDateTimeStringNoMapped drive item property; populated only when returned and supported by the resource.
changeKeychangeKeyStringNoMapped drive item property; populated only when returned and supported by the resource.
iCalUIdiCalUIdStringNoMapped drive item property; populated only when returned and supported by the resource.
webLinkwebLinkStringNoMapped drive item property; populated only when returned and supported by the resource.
isReminderOnisReminderOnBooleanNoMapped drive item property; populated only when returned and supported by the resource.
reminderMinutesBeforeStartreminderMinutesBeforeStartIntegerNoMapped drive item property; populated only when returned and supported by the resource.
eventTypeeventTypeStringNoMapped drive item property; populated only when returned and supported by the resource.
onlineMeetingUrlonlineMeetingUrlStringNoMapped drive item property; populated only when returned and supported by the resource.
isOnlineMeetingisOnlineMeetingBooleanNoMapped drive item property; populated only when returned and supported by the resource.
onlineMeetingProvideronlineMeetingProviderStringNoMapped drive item property; populated only when returned and supported by the resource.
organizerorganizerMSGraphEventOrganizerNoMapped drive item property; populated only when returned and supported by the resource.
responseStatusresponseStatusMSGraphEventResponseStatusNoMapped drive item property; populated only when returned and supported by the resource.
attendeesattendeesList<MSGraphEventAttendee>NoMapped drive item property; populated only when returned and supported by the resource.

Outputs

Returns one mapped MSGraphEvent inside a list. Check the actual result shape and fields before use. This implementation creates a default result object when the response is null; an object alone does not prove that a resource was returned.

OutputApex fieldTypeDescription
ididStringMapped drive item property; populated only when returned and supported by the resource.
odataEtagodataEtagStringMapped drive item property; populated only when returned and supported by the resource.
subjectsubjectStringMapped drive item property; populated only when returned and supported by the resource.
bodyPreviewbodyPreviewStringMapped drive item property; populated only when returned and supported by the resource.
bodybodyMSGraphEventBodyMapped drive item property; populated only when returned and supported by the resource.
startTimestartTimeMSGraphDateTimeTimeZoneMapped drive item property; populated only when returned and supported by the resource.
endTimeendTimeMSGraphDateTimeTimeZoneMapped drive item property; populated only when returned and supported by the resource.
originalStartTimeZoneoriginalStartTimeZoneStringMapped drive item property; populated only when returned and supported by the resource.
originalEndTimeZoneoriginalEndTimeZoneStringMapped drive item property; populated only when returned and supported by the resource.
locationlocationMSGraphEventLocationMapped drive item property; populated only when returned and supported by the resource.
isAllDayisAllDayBooleanMapped drive item property; populated only when returned and supported by the resource.
showAsshowAsStringMapped drive item property; populated only when returned and supported by the resource.
isCancelledisCancelledBooleanMapped drive item property; populated only when returned and supported by the resource.
isOrganizerisOrganizerBooleanMapped drive item property; populated only when returned and supported by the resource.
importanceimportanceStringMapped drive item property; populated only when returned and supported by the resource.
sensitivitysensitivityStringMapped drive item property; populated only when returned and supported by the resource.
categoriescategoriesList<String>Mapped drive item property; populated only when returned and supported by the resource.
createdDateTimecreatedDateTimeStringMapped drive item property; populated only when returned and supported by the resource.
lastModifiedDateTimelastModifiedDateTimeStringMapped drive item property; populated only when returned and supported by the resource.
changeKeychangeKeyStringMapped drive item property; populated only when returned and supported by the resource.
iCalUIdiCalUIdStringMapped drive item property; populated only when returned and supported by the resource.
webLinkwebLinkStringMapped drive item property; populated only when returned and supported by the resource.
isReminderOnisReminderOnBooleanMapped drive item property; populated only when returned and supported by the resource.
reminderMinutesBeforeStartreminderMinutesBeforeStartIntegerMapped drive item property; populated only when returned and supported by the resource.
eventTypeeventTypeStringMapped drive item property; populated only when returned and supported by the resource.
onlineMeetingUrlonlineMeetingUrlStringMapped drive item property; populated only when returned and supported by the resource.
isOnlineMeetingisOnlineMeetingBooleanMapped drive item property; populated only when returned and supported by the resource.
onlineMeetingProvideronlineMeetingProviderStringMapped drive item property; populated only when returned and supported by the resource.
organizerorganizerMSGraphEventOrganizerMapped drive item property; populated only when returned and supported by the resource.
responseStatusresponseStatusMSGraphEventResponseStatusMapped drive item property; populated only when returned and supported by the resource.
attendeesattendeesList<MSGraphEventAttendee>Mapped drive item property; populated only when returned and supported by the resource.

Behavior and limits

Delegated authorization can select /me for user-calendar operations. Outside delegated access, supply the target user required by runtime validation; optional invocable user fields can still be conditionally required.

Event is an MSGraphEvent model. The action builds a PATCH from supported fields and requires at least one update. If supplied, Attendees CSV replaces the model attendee list before serialization. Nested time objects use dateTimeValue/timeZone. Read-only returned properties are not a promise of writable update support.

Use in Flow

Use MS Entra – Calendars – Update Event where supported. Use a Microsoft 365 application connector configured as Set as default for Flow automations only if the endpoint and target support application access. Supply required values, retain useful outputs, and add fault handling. Delegated connections are not supported for CloudTools Flow automation. The action processes only the first input request.

Use in custom Apex

This subscriber-org example uses the Apptigent namespace. Replace identifiers and example values before use. Configure the connector, complete authorization first, run in a context permitting callouts, and handle exceptions, empty results, and unmapped fields.

Apptigent.UpdateMSGraphEvent.UpdateMSGraphEventInput request =
    new Apptigent.UpdateMSGraphEvent.UpdateMSGraphEventInput();
request.userEmail = 'someone@example.com';
request.eventId = 'AAMkAGI2TAAA=';
request.calendarId = 'calendar-id';
request.eventItem = new Apptigent.MSGraphEvent();
request.attendeesCsv = 'alex.wilber@example.com,adele.vance@example.com';

request.eventItem.subject = 'Updated planning meeting';

List<Apptigent.MSGraphEvent> results =
    Apptigent.UpdateMSGraphEvent.updateEvent(
        new List<Apptigent.UpdateMSGraphEvent.UpdateMSGraphEventInput>{ request }
    );
System.debug(results);

Use in a Lightning Web Component

Use updateMSGraphEvent from msEntraConnectorLib through MSEntraConnectorController. These c/ imports apply in the same namespace. Set request.connectorId for direct MSEntraAction calls. The controller captures the request selection for MSEntraAction.

Global inputLWC request mapping
userEmailrequest.userIdOrPrincipalName
eventIdrequest.eventId
calendarIdrequest.calendarId
eventItemeventJson or mapped event upsert fields
attendeesCsvrequest.attendeesCsv

entraActionExample.js

import { LightningElement } from 'lwc';
import { updateMSGraphEvent } from 'c/msEntraConnectorLib';

export default class EntraActionExample extends LightningElement {
    result = null;
    errorMessage = '';
    isRunning = false;
    completed = false;

    async handleRun() {
        if (this.isRunning || this.completed) return;
        this.isRunning = true;
        this.errorMessage = '';
        try {
            const request = { connectorId: 'REPLACE_WITH_CONNECTOR_RECORD_ID' };
            request.userIdOrPrincipalName = 'someone@example.com';
            request.eventId = 'AAMkAGI2TAAA=';
            request.calendarId = 'calendar-id';
            request.subject = 'Updated planning meeting';
            request.attendeesCsv = 'alex.wilber@example.com,adele.vance@example.com';
            this.result = await updateMSGraphEvent(request);
            this.completed = true;
        } catch (error) {
            this.errorMessage = error.requiresInteractiveAuthorization
                ? 'Sign in to Microsoft for the connector, then try again.'
                : error.message || 'The Entra action failed.';
        } finally {
            this.isRunning = false;
        }
    }
}

entraActionExample.html

<template>
    <lightning-button label="Run action" onclick={handleRun}
        disabled={isRunning}></lightning-button>
    <p role="alert">{errorMessage}</p>
</template>

The library returns one mapped DTO or null. The controller can flatten nested fields, serialize data, or map an action result into an operation DTO. rawJson contains serialized mapped Apex data rather than the untouched Graph response.

Use getMSEntraAuthorizationState, beginMSEntraAuthorization, and createMSEntraOAuthMessageHandler to arrange delegated sign-in. The library normalizes errors but does not automatically sign in or retry. Reset completed for a new deliberate operation, and inspect resource state before retrying a mutation with an uncertain outcome.

Error handling and troubleshooting

SymptomWhat to check
Required fields errorSupply a nonempty request list and required or conditionally required inputs. For LWC, use the mapped field names.
Authorization or access deniedCheck connector selection, sign-in, endpoint/target permission support, administrator consent, directory roles, and resource access.
Resource not foundCheck Microsoft IDs and parent resource relationships. Preserve group/drive/item associations and mailbox/calendar/event IDs.
Missing or unexpected outputCheck query support, pagination, wrapper versus item models, public-only properties, and mapped DTO fields.
Operation rejectedInspect the Microsoft error, supported writable fields, group/calendar restrictions, recipient/license data, and file transfer limits.

See Entra connector introduction.

Share this Doc

MS Entra – Calendars – Update Event

Or copy link

CONTENTS

Free eBook: The Ultimate Guide to Power Platform Custom Connectors

Antimanual

Ask our AI support assistant your questions about our platform, features, and services.

You are offline
Chatbot avatar
What can I help you with?

Subscribe

×
Cancel