Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 34 additions & 7 deletions docs/docs/cmd/teams/chat/chat-message-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,33 @@ m365 teams chat message list [options]

```md definition-list
`-i, --chatId <chatId>`
: The ID of the chat conversation
: The ID of the chat conversation.

`--endDateTime [endDateTime]`
: Time indicating the exclusive end of a time range when the message was created.
```

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|------------------|
| Microsoft Graph | ChatMessage.Read |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|----------------------|
| Microsoft Graph | ChatMessage.Read.All |

</TabItem>
</Tabs>

## Examples

List the messages from a Microsoft Teams chat conversation
Expand All @@ -29,6 +51,12 @@ List the messages from a Microsoft Teams chat conversation
m365 teams chat message list --chatId 19:2da4c29f6d7041eca70b638b43d45437@thread.v2
```

List messages from a Microsoft Teams chat conversation created before November 1, 2022

```sh
m365 teams chat message list --chatId 19:2da4c29f6d7041eca70b638b43d45437@thread.v2 --endDateTime 2022-11-01T00:00:00Z
```

## Response

<Tabs>
Expand Down Expand Up @@ -79,17 +107,17 @@ m365 teams chat message list --chatId 19:2da4c29f6d7041eca70b638b43d45437@thread
<TabItem value="Text">

```text
id shortBody
------------- -------------------------
1667653590582 <p>Hello world</p>
id createdDateTime shortBody
------------- ------------------------ ------------------
1667653590582 2022-11-05T13:06:30.582Z <p>Hello world</p>
```

</TabItem>
<TabItem value="CSV">

```csv
id,shortBody
1667653590582,<p>Hello world</p>
id,createdDateTime,shortBody
1667653590582,2022-11-05T13:06:30.582Z,<p>Hello world</p>
```

</TabItem>
Expand Down Expand Up @@ -118,4 +146,3 @@ m365 teams chat message list --chatId 19:2da4c29f6d7041eca70b638b43d45437@thread

</TabItem>
</Tabs>

Loading