| title | mailFolder: updateAllMessagesReadState |
|---|---|
| description | Update the read state of all messages in a mailFolder object. |
| author | ka-gunase |
| ms.localizationpriority | medium |
| ms.subservice | outlook |
| doc_type | apiPageType |
| ms.date | 02/25/2025 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Update the read state of all messages in a mailFolder object.
[!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]
POST /me/mailFolders/{mailFolderId}/updateAllMessagesReadState
POST /users/{userId}/mailFolders/{mailFolderId}/updateAllMessagesReadState| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
| Content-Type | application/json. Required. |
In the request body, supply a JSON representation of the parameters.
The following table lists the parameters that are required when you call this action.
| Parameter | Type | Description |
|---|---|---|
| isRead | Boolean | Indicates whether to mark messages as read or unread. |
| suppressReadReceipts | Boolean | Indicates whether to suppress the read receipts for messages from the receiving end. |
If successful, this action returns a 202 Accepted response code. The response contains a Location header that specifies the location of the mailFolderOperation that was created to handle the updating read state of the messages. Check the status of the updating operation by making a GET request to this location.
The following example marks messages in the mail folder as read.
POST https://graph.microsoft.com/beta/me/mailFolders/AAMkAGVmMDEzM/updateAllMessagesReadState
Content-Type: application/json
{
"isRead": true,
"suppressReadReceipts": true
}[!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 202 Accepted
Location: https://graph.microsoft.com/beta/users('95de90d3-2e59-4c87-9303-8cbc24ec3985')/mailFolders('AAMkAGRkZTFiMD')/operations('5667fd27-dc59-4e78-9ad2-857dbb437841')