Skip to content

Commit a88c483

Browse files
authored
Merge pull request #25036 from microsoftgraph/2024-08-21-channel-list-message-reponse-body-sorting-order
Adding notes on channel messages sorting order for ListChannelMessages API
2 parents 4abb590 + 593b3d4 commit a88c483

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

api-reference/beta/api/channel-list-messages.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Choose the permission or permissions marked as least privileged for this API. Us
3131
[!INCLUDE [permissions-table](../includes/permissions/channel-list-messages-permissions.md)]
3232

3333
> [!NOTE]
34-
> - The ChannelMessage.Read.Group permission uses [resource-specific consent](/microsoftteams/platform/graph-api/rsc/resource-specific-consent).
35-
> - The Group.Read.All and Group.ReadWrite.All permissions are supported only for backward compatibility. We recommend that you update your solutions to use an alternative permission listed in the previous table and avoid using these permissions going forward.
34+
> - The `ChannelMessage.Read.Group` permission uses [resource-specific consent](/microsoftteams/platform/graph-api/rsc/resource-specific-consent).
35+
> - The `Group.Read.All` and `Group.ReadWrite.All` permissions are supported only for backward compatibility. We recommend that you update your solutions to use an alternative permission listed in the previous table and avoid using these permissions going forward.
3636
3737
## HTTP request
3838

@@ -66,7 +66,7 @@ Don't supply a request body for this method.
6666

6767
## Response
6868

69-
If successful, this method returns a `200 OK` response code and a collection of [chatMessage](../resources/chatmessage.md) objects in the response body.
69+
If successful, this method returns a `200 OK` response code and a collection of [chatMessage](../resources/chatmessage.md) objects in the response body. The channel messages in the response are sorted by the last modified date of the entire reply chain, including both the root channel message and its replies.
7070

7171
## Examples
7272

@@ -558,7 +558,7 @@ GET https://graph.microsoft.com/beta/teams/fbe2bf47-16c8-47cf-b4a5-4b9b187c508b/
558558
#### Response
559559
The following response shows one channel message on the page, and includes a URL in `@odata.nextLink` for a subsequent operation to get the next message in that channel.
560560

561-
The response includes replies of that channel message. In practice, this operation can return up to 1,000 replies of a channel message, and includes a URL in `replies@odata.nextLink` to get any further replies beyond the page size of 1000. This example assumes more than 1,000 replies in that channel message, but for readability, the following response shows only three replies.
561+
The response includes replies of that channel message. In practice, this operation can return up to 1,000 replies of a channel message, and includes a URL in `replies@odata.nextLink` to get any further replies beyond the page size of 1,000. This example assumes more than 1,000 replies in that channel message, but for readability, the following response shows only three replies.
562562

563563
<!-- {
564564
"blockType": "response",

api-reference/v1.0/api/channel-list-messages.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Choose the permission or permissions marked as least privileged for this API. Us
2929
[!INCLUDE [permissions-table](../includes/permissions/channel-list-messages-permissions.md)]
3030

3131
> [!NOTE]
32-
> The ChannelMessage.Read.Group permission uses [resource-specific consent](/microsoftteams/platform/graph-api/rsc/resource-specific-consent).
32+
> The `ChannelMessage.Read.Group` permission uses [resource-specific consent](/microsoftteams/platform/graph-api/rsc/resource-specific-consent).
3333
3434
## HTTP request
3535

@@ -45,9 +45,9 @@ This method supports the following [OData query parameters](/graph/query-paramet
4545
| Name | Description |
4646
|:----------|:---------------------|
4747
| [$top](/graph/query-parameters#top-parameter)| Apply `$top` to specify the number of channel messages returned per page in the response. The default page size is 20 messages. You can extend up to 50 channel messages per page. |
48-
| [$expand](/graph/query-parameters#expand) | Apply `$expand` to get the properties of channel messages that are replies. By default, a response can include up to 1000 replies. For an operation that expands channel messages with more than 1000 replies, use the request URL returned in `replies@odata.nextLink` to get the next page of replies. |
48+
| [$expand](/graph/query-parameters#expand) | Apply `$expand` to get the properties of channel messages that are replies. By default, a response can include up to 1,000 replies. For an operation that expands channel messages with more than 1,000 replies, use the request URL returned in `replies@odata.nextLink` to get the next page of replies. |
4949

50-
The other [OData query parameters](/graph/query-parameters) are not currently supported.
50+
The other [OData query parameters](/graph/query-parameters) aren't currently supported.
5151

5252
> **Note:** [GET /teams/{team-id}/channels/{channel-id}/messages/delta](chatmessage-delta.md) supports filtering by date, which provides similar data to GET /teams/{team-id}/channels/{channel-id}/messages .
5353
@@ -63,15 +63,15 @@ Don't supply a request body for this method.
6363

6464
## Response
6565

66-
If successful, this method returns a `200 OK` response code and a collection of [chatMessage](../resources/chatmessage.md) objects in the response body.
66+
If successful, this method returns a `200 OK` response code and a collection of [chatMessage](../resources/chatmessage.md) objects in the response body. The channel messages in the response are sorted by the last modified date of the entire reply chain, including both the root channel message and its replies.
6767

6868
## Examples
6969

7070
### Example 1: Request with $top query parameter and without optional prefer header
7171

7272
#### Request
7373

74-
The following example shows a request with the $top query option and without the optional prefer header.
74+
The following example shows a request with the `$top` query option and without the optional prefer header.
7575

7676

7777
# [HTTP](#tab/http)
@@ -544,7 +544,7 @@ GET https://graph.microsoft.com/v1.0/teams/fbe2bf47-16c8-47cf-b4a5-4b9b187c508b/
544544
#### Response
545545
The following response shows one channel message on the page, and includes a URL in `@odata.nextLink` for a subsequent operation to get the next message in that channel.
546546

547-
The response includes replies of that channel message. In practice, this operation can return up to 1000 replies of a channel message, and includes a URL in `replies@odata.nextLink` to get any further replies beyond the page size of 1000. This example assumes more than 1000 replies in that channel message, but for readability, the following response shows only 3 replies.
547+
The response includes replies of that channel message. In practice, this operation can return up to 1,000 replies of a channel message, and includes a URL in `replies@odata.nextLink` to get any further replies beyond the page size of 1,000. This example assumes more than 1,000 replies in that channel message, but for readability, the following response shows only three replies.
548548

549549
<!-- {
550550
"blockType": "response",

0 commit comments

Comments
 (0)