web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding, updating and d...
Power Automate
Suggested Answer

Adding, updating and deleting an event in a group calendar based on users calendar

(0) ShareShare
ReportReport
Posted on by

We have an Office-team for all office staff with an associated group calendar.

My objective is to eliminate the need to keep both personal and group calendar updated for availability, so the idea is to use PA to create a cloud flow for all users that will take an event in the users own calendar if the status is "Out of office" and use this to create a group calendar event with similar properties.

Using 'When an event is added, updated or deleted V3' as a trigger I can create the event in the group calendar just fine, but trying to use switch to set up 3 conditions triggering 'Create a group event V2', 'Update a group event' or 'Delete event V2' (all for Offie 365 Groups) - only the create works. Both the Update and delete fail with the same error: "The specified object was not found in the store."

Any suggestions how to work around this so that we can allow the users a single point of entry/modification of calendar events

that will propagate to a shared calendar and effectively show Out of Office status for all users?

 

Categories:
I have the same question (4)
  • Suggested answer
    AD-24111229-0 Profile Picture
    2 on at
    ✅ 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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard