Graph API : delete calendar events without putting them in trash bin

CHATILLON Laurent 0 Reputation points
2023-01-16T08:39:12.2166667+00:00

Hello,

I'm writing a program that uses using Graph API.
Every day, this program deletes and recreates calendar events.

It works fine, except a problem : all the removed calendar events go to the trash bin.

Users are complaining beacause each day, they have dozens of removed calendar events in their trash bin.

So my question is : Is there a way to remove a calendar event with API Graph, without having them in the trash bin ?

Thanks for your help,

Laurent

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Shivam Dhiman 6,086 Reputation points
    2023-01-16T23:29:41.5166667+00:00

    Hi @CHATILLON Laurent

    As per my knowledge, when you delete calendar event then the deleted item mail folder will contain an item of @odata.type #microsoft.graph.eventMessageRequest.

    Use this DELETE /users/{id | userPrincipalName}/mailFolders/{id}/messages/{id} Graph API endpoint the deleted item mail folder messages from your user's mailbox.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.