Delete attachment api call is giving 500 Internal Server Error

Shubham Yadav 10 Reputation points
2024-04-07T13:30:52.9466667+00:00

For the following API:

DELETE https://graph.microsoft.com/v1.0/me/events/{eventId}/attachments/{attachmentId{}}

I am getting the following response:

{
    "error": {
        "code": "ErrorInternalServerError",
        "message": "An internal server error occurred. The operation failed."
    }
}

but if I just use this endpoint:

DELETE https://graph.microsoft.com/v1.0/me/events/{eventId}/attachments

the response is successful, can you please help here I am following the following Microsoft learn resource
https://learn.microsoft.com/en-us/graph/api/attachment-delete?view=graph-rest-1.0&tabs=http

Note:

scope of my access token is Calendars.ReadWrite, so access token is valid for my request and also the attachment exist in the event I have cross-checked it multiple times.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,074 questions
{count} votes

1 answer

Sort by: Most helpful
  1. CharanyaB-MSFT 1,891 Reputation points Microsoft Vendor
    2024-04-08T21:40:41.39+00:00

    Hi @Shubham Yadav,

    Thanks for reaching Microsoft.

    I tried this API, but I was not able to replicate this issue. I was able to delete the event attachments successfully with the below API and received "HTTP/1.1 204 No Content" response.

    DELETE /me/events/{eventId}/attachments/{attachmentId}

    As this seems to be a tenant specific issue, I would recommend you to raise a support case with Microsoft Graph, a Support Engineer will be able to assist you better. You can raise support ticket from New support request - Microsoft Entra admin center or https://admin.microsoft.com/#/support/requests.

    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.