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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can't delete item from...
Power Apps
Unanswered

Can't delete item from Outlook Calendar with Office365Outlook.CalendarDeleteItemV2

(0) ShareShare
ReportReport
Posted on by 118

Hi 

 

I have created an app for event registration and  am trying to remove events from users' calendar when they decide to cancel their registration. The code I am using is this: 

 

Set(varUserCalendarlId, 
 LookUp(Office365Outlook.CalendarGetTablesV2().value, 
 name="Calendar").id
);
With({idCalendarEntry:
 First(
 Office365Outlook.GetEventsCalendarViewV3(
 varUserCalendarId,
 Text(DateTimeValue(StartDateTimeDataCardValue.Text,"en-GB"),DateTimeFormat.UTC),
 
 Text(DateTimeValue(EndDateTimeDataCardValue.Text,"en-GB"),DateTimeFormat.UTC), 
 
 {search:"Auto-entry by sign-up App"}
 ).value
 )
 },
 Office365Outlook.CalendarDeleteItemV2(
 varUserCalendarId,
 idCalendarEntry.id
 ) 
)

 

I know that the code returns the correct calendar ID (I have used the same code for entering the even into participant's calendars and it works) but for some reason it does not delete the even even though I get no error messages either from PowerApps studio or when I run the app. Any ideas where the bug might be?   Many thanks in advance

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at

    Hi @Siamak ,

     

    Have you also verified you are receiving the correct idCalendarEntry? You can test this by pasting the below code in a Label:

     

    First(
     Office365Outlook.GetEventsCalendarViewV3(
     varUserCalendarId,
     Text(DateTimeValue(StartDateTimeDataCardValue.Text,"en-GB"),DateTimeFormat.UTC),
     
     Text(DateTimeValue(EndDateTimeDataCardValue.Text,"en-GB"),DateTimeFormat.UTC), 
     
     {search:"Auto-entry by sign-up App"}
     ).value
     ).id
  • Siamak Profile Picture
    118 on at

    Yes, I do get an ID code for idCalendarEntry which seems to be a correct one as it only shows up when there is an entry in the calendar. And thanks for you speedy reply

  • BCBuizer Profile Picture
    22,636 Super User 2026 Season 1 on at

    Hi @Siamak ,

     

    If you have a value, it means you indeed have the code to capture the idCalendarEntry correct.

     

    I just tested a similar set-up and unfortunately... it's working just as expected. That means there's very little to go on in trying to support you...

  • Siamak Profile Picture
    118 on at

    Thank you for your reply. Can I just double check. When you say it worked as expected, you mean  it actually deleted the event from Outlook yes? If that's the case, then it is very strange that it is not working for me. Is there any alternative code I could use instead of CalendarDeleteItemV2? Is there a remove function?

  • Siamak Profile Picture
    118 on at

    Update!!!

    I just tried the code again and it worked fine. Thank you very much for taking the time to help and advise. Much appreciated 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard