Can I update the email body when deleting the event?

Julián José López Arellano 20 Reputation points
2025-02-17T13:14:26.3833333+00:00

I am using this method to delete the event, but I don’t see the possibility of updating the email body upon deletion. Is this correct?

String url = String.format("https://graph.microsoft.com/v1.0/users/%s/calendar/events/%s",
        event.getOrganizerEmail(), event.getOnlineMeetingId());

HttpHeaders headers = new HttpHeaders();
headers.set("Authorization", "Bearer " + auth);
headers.set("Content-Type", "application/json");

HttpEntity<String> request = new HttpEntity<>(null, headers);

try {
    ResponseEntity<Void> response = restTemplate.exchange(url, HttpMethod.DELETE, request, Void.class);
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,111 questions
Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
693 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Akhil Nasalwai - MSFT 500 Reputation points Microsoft Vendor
    2025-02-17T14:30:02.8033333+00:00

    Hello Julián José López Arellano,

    Thank you for reaching out to Microsoft!

    Yes, you are correct. The provided JavaScript code is focused on deleting the event using the Microsoft Graph API. The HTTP DELETE request send to Graph API endpoint will remove the event from the calendar, but it does not provide an option to update the email body of the cancellation notification.

    To send a custom email notification upon event deletion, you would need to manually send an email with the updated content.

    Hope this helps.

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


  2. Yakun Huang-MSFT 10,095 Reputation points Microsoft Vendor
    2025-02-18T01:29:27.0166667+00:00

    Hello Julián José López Arellano,

    Thank you for reaching out to Microsoft Support!

    According to the documentation, when deleting the event, If the event is a meeting, deleting the event on the organizer's calendar sends a cancellation message to the meeting attendees. This message is sent by default.

    Adding a request body is not supported when the delete request is sent, so the message content cannot be changed when the event is deleted.

    User's image

    Hope this helps.

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


Your answer

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