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

Community site session details

Session Id : R/LWUYheKb9B3LIFJHCnx/
Power Apps - Building Power Apps
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 17 Aug 2022 13:05:37 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

I have the same question (0)
  • Siamak Profile Picture
    118 on 17 Aug 2022 at 20:45:43
    Re: Can't delete item from Outlook Calendar with Office365Outlook.CalendarDeleteItemV2

    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 

  • Siamak Profile Picture
    118 on 17 Aug 2022 at 20:41:53
    Re: Can't delete item from Outlook Calendar with Office365Outlook.CalendarDeleteItemV2

    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?

  • BCBuizer Profile Picture
    22,280 Super User 2025 Season 2 on 17 Aug 2022 at 17:42:13
    Re: Can't delete item from Outlook Calendar with Office365Outlook.CalendarDeleteItemV2

    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 17 Aug 2022 at 14:10:34
    Re: Can't delete item from Outlook Calendar with Office365Outlook.CalendarDeleteItemV2

    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,280 Super User 2025 Season 2 on 17 Aug 2022 at 13:44:46
    Re: Can't delete item from Outlook Calendar with Office365Outlook.CalendarDeleteItemV2

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473