| title | Delete message |
|---|---|
| description | Delete a message in the specified user's mailbox, or delete a relationship of the message. |
| ms.localizationpriority | medium |
| author | SuryaLashmiS |
| ms.subservice | outlook |
| doc_type | apiPageType |
| ms.date | 06/21/2024 |
Namespace: microsoft.graph
Delete a message in the specified user's mailbox, or delete a relationship of the message.
Note You may not be able to delete items in the recoverable items deletions folder (represented by the well-known folder name
recoverableitemsdeletions). See Deleted item retention and Clean up deleted items for more information.
[!INCLUDE national-cloud-support]
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
[!INCLUDE permissions-table]
DELETE /me/messages/{id}
DELETE /users/{id | userPrincipalName}/messages/{id}
DELETE /me/mailFolders/{id}/messages/{id}
DELETE /users/{id | userPrincipalName}/mailFolders/{id}/messages/{id}| Name | Type | Description |
|---|---|---|
| Authorization | string | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns 204 No Content response code. It doesn't return anything in the response body.
The following example shows a request.
DELETE https://graph.microsoft.com/v1.0/me/messages/{id}[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
[!INCLUDE sample-code] [!INCLUDE sdk-documentation]
The following example shows the response.
HTTP/1.1 204 No Content