Skip to main content

teams chat message list

Lists all messages from a Microsoft Teams chat conversation.

Usage

m365 teams chat message list [options]

Options

-i, --chatId <chatId>

The ID of the chat conversation

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Examples

List the messages from a Microsoft Teams chat conversation

m365 teams chat message list --chatId 19:2da4c29f6d7041eca70b638b43d45437@thread.v2

Response

[
{
"id": "1667653590582",
"replyToId": null,
"etag": "1667653590582",
"messageType": "message",
"createdDateTime": "2022-11-05T13:06:30.582Z",
"lastModifiedDateTime": "2022-11-05T13:06:30.582Z",
"lastEditedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"chatId": "19:2da4c29f6d7041eca70b638b43d45437@thread.v2",
"importance": "normal",
"locale": "en-us",
"webUrl": null,
"channelIdentity": null,
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"id": "78ccf530-bbf0-47e4-aae6-da5f8c6fb142",
"displayName": "John Doe",
"userIdentityType": "aadUser",
"tenantId": "446355e4-e7e3-43d5-82f8-d7ad8272d55b"
}
},
"body": {
"contentType": "html",
"content": "<p>Hello world</p>"
},
"attachments": [],
"mentions": [],
"reactions": []
}
]
CTRL + M