✅ Power Automate – Graph API for Calendar Event Management
Overview
To manage calendar events (Create, Update, Delete) for a shared mailbox or group calendar using Power Automate, you can use Microsoft Graph API with an HTTP action. This requires an OAuth token from Azure AD.
✅ Step 1: Register an App in Azure AD
-Go to Azure Active Directory → App Registrations → New Registration.
-Give the app a name (e.g., GraphCalendarApp).
-Set Supported account types: Single tenant or multi-tenant as per your org.
-Add a Redirect URI (optional for Power Automate).
-Click Register.
✅ Step 2: Configure API Permissions
-Go to API Permissions → Add a permission → Microsoft Graph → Delegated.
-Add:
Calendars.ReadWrite
Mail.Send (if sending invites)
-Click Grant admin consent.
✅ Step 3: Generate Authentication Details
-From App Registration → Certificates & Secrets:
Create a Client Secret.
Note down:
-Tenant ID
-Client ID
-Client Secret
✅ Step 4: Generate OAuth Token
-Use HTTP action in Power Automate to get the token:
-Endpoint:
POST https://login.microsoftonline.com/{tenantId}/oauth2/v2.0/token
-Headers:
Content-Type: application/x-www-form-urlencoded
-Body:
grant_type=client_credentials
client_id={clientId}
client_secret={clientSecret}
scope=https://graph.microsoft.com/.default
-Response:
JSON{ "token_type": "Bearer", "expires_in": 3599, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOi..."}
-Use access_token in subsequent Graph API calls.
✅ Step 5: Create Event
-Endpoint:
POST https://graph.microsoft.com/v1.0/users/{sharedMailboxEmail}/events
-Headers:
Authorization: Bearer {access_token}
Content-Type: application/json
-Body
Example:
JSON{ "subject": "Team Meeting", "start": { "dateTime": "2025-12-01T10:00:00", "timeZone": "India Standard Time" }, "end": { "dateTime": "2025-12-01T11:00:00", "timeZone": "India Standard Time" }, "attendees": [ { "emailAddress": { "address": "user1@domain.com" }, "type": "required" } ], "location": { "displayName": "Conference Room" }}
✅ Step 6: Update Event
-Endpoint:
PATCH https://graph.microsoft.com/v1.0/users/{sharedMailboxEmail}/events/{eventId}
-Body Example:
JSON{ "subject": "Updated Meeting Title", "start": { "dateTime": "2025-12-01T10:30:00", "timeZone": "India Standard Time" }, "end": { "dateTime": "2025-12-01T11:30:00", "timeZone": "India Standard Time" }}
✅ Step 7: Delete Event
-Endpoint:
DELETE https://graph.microsoft.com/v1.0/users/{sharedMailboxEmail}/events/{eventId}
-Headers:
Authorization: Bearer {access_token}
✅ Parameters
{tenantId} → Your Azure AD tenant ID.
{clientId} → App registration client ID.
{clientSecret} → App registration secret.
{sharedMailboxEmail} → e.g., sharedmailbox@domain.com.
{eventId} → Returned from Create Event API.
It is working I have tried it.