Skip to main content

teams message get

Retrieves a message from a channel in a Microsoft Teams team


m365 teams message get [options]


-t, --teamId <teamId>

The ID of the team where the channel is located.

-c, --channelId <channelId>

The ID of the channel that contains the message.

-i, --id <id>

The ID of the message to retrieve.

-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 for more information and examples.

-o, --output [output]

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


Runs command with verbose logging.


Runs command with debug logging.


You can only retrieve a message from a Microsoft Teams team if you are a member of that team.


Retrieve the specified message from a channel of the Microsoft Teams team.

m365 teams message get --teamId 5f5d7b71-1161-44d8-bcc1-3da710eb4171 --channelId --id 1540747442203


"id": "1540747442203",
"replyToId": null,
"etag": "1666799582385",
"messageType": "message",
"createdDateTime": "2022-10-26T15:52:00.731Z",
"lastModifiedDateTime": "2022-10-26T15:53:02.385Z",
"lastEditedDateTime": "2022-10-26T15:53:02.288Z",
"deletedDateTime": null,
"subject": "Second message Title",
"summary": null,
"chatId": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "",
"policyViolation": null,
"eventDetail": null,
"from": {
"application": null,
"device": null,
"user": {
"id": "78ccf530-bbf0-47e4-aae6-da5f8c6fb142",
"displayName": "John Doe",
"userIdentityType": "aadUser",
"tenantId": "92e59666-257b-49c3-b1fa-1bae8107f6ba"
"body": {
"contentType": "text",
"content": "second message!"
"channelIdentity": {
"teamId": "5f5d7b71-1161-44d8-bcc1-3da710eb4171",
"channelId": "19:e2916df2b11046beba42d22da898383f@thread.tacv2"
"attachments": [],
"mentions": [],
"reactions": []