> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Chat Messages

List messages from a chat.

* Microsoft Graph permissions to access the action via **App Registration**: `Chat.Read.All`, `Chat.ReadWrite.All`.

<Note>
  External Documentation

  To learn more, visit the [Microsoft Teams documentation](https://learn.microsoft.com/en-us/graph/api/chat-list-messages?view=graph-rest-1.0).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter        | Description                                                                                                                                                                 |
  | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Chat ID          | The ID of the chat.<br />Can be obtained by using the `List Chats` action.<br /><br />`Note`: The dynamic dropdown is supported only for **OAuth** (delegated) connections. |
  | Filter           | Filters results (rows). For example: (lastModifiedDateTime gt now() - "15m") (not required)                                                                                 |
  | Limit            | Specify the number of chat messages returned per page in the response. Valid range is 1-50.                                                                                 |
  | Return All Pages | Automatically fetch all resources, page by page.                                                                                                                            |
</div>

## Example Output

```json theme={"dark"}
{
	"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3A2da4c29f6d7041eca70b638b43d45437%40thread.v2')/messages",
	"@odata.count": 3,
	"@odata.nextLink": "https://graph.microsoft.com/v1.0/chats/19:2da4c29f6d7041eca70b638b43d45437@thread.v2/messages?$top=2&$skiptoken=M2UyZDAwMDAwMDMxMzkzYTMyNjQ2MTM0NjMzMjM5NjYzNjY0MzczMDM0MzE2NTYzNjEzNzMwNjIzNjMzMzg2MjM0MzM2NDM0MzUzNDMzMzc0MDc0Njg3MjY1NjE2NDJlNzYzMjAxZThmYjY4M2Y3ODAxMDAwMDg4NjA5ODdhNzgwMTAwMDB8MTYxNjk2NDUwOTgzMg%3d%3d",
	"value": [
		{
			"id": "1616964509832",
			"replyToId": null,
			"etag": "1616964509832",
			"messageType": "message",
			"createdDateTime": "2021-03-28T20:48:29.832Z",
			"lastModifiedDateTime": "2021-03-28T20:48:29.832Z",
			"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": "8ea0e38b-efb3-4757-924a-5f94061cf8c2",
					"displayName": "Robin Kline",
					"userIdentityType": "aadUser"
				}
			},
			"body": {
				"contentType": "text",
				"content": "Hello world"
			},
			"attachments": [],
			"mentions": [],
			"reactions": []
		},
		{
			"id": "1615971548136",
			"replyToId": null,
			"etag": "1615971548136",
			"messageType": "message",
			"createdDateTime": "2021-03-17T08:59:08.136Z",
			"lastModifiedDateTime": "2021-03-17T08:59:08.136Z",
			"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": "8ea0e38b-efb3-4757-924a-5f94061cf8c2",
					"displayName": "Robin Kline",
					"userIdentityType": "aadUser"
				}
			},
			"body": {
				"contentType": "html",
				"content": "<div><div><div><span><img height=\"63\" src=\"https://graph.microsoft.com/v1.0/chats/19:2da4c29f6d7041eca70b638b43d45437@thread.v2/messages/1615971548136/hostedContents/aWQ9eF8wLXd1cy1kOS1lNTRmNjM1NWYxYmJkNGQ3ZTNmNGJhZmU4NTI5MTBmNix0eXBlPTEsdXJsPWh0dHBzOi8vdXMtYXBpLmFzbS5za3lwZS5jb20vdjEvb2JqZWN0cy8wLXd1cy1kOS1lNTRmNjM1NWYxYmJkNGQ3ZTNmNGJhZmU4NTI5MTBmNi92aWV3cy9pbWdv/$value\" width=\"67\" style=\"vertical-align:bottom; width:67px; height:63px\"></span></div></div></div>"
			},
			"attachments": [],
			"mentions": [],
			"reactions": []
		},
		{
			"id": "1615943825123",
			"replyToId": null,
			"etag": "1615943825123",
			"messageType": "unknownFutureValue",
			"createdDateTime": "2021-03-1706:47:05.123Z",
			"lastModifiedDateTime": "2021-03-1706:47:05.123Z",
			"lastEditedDateTime": null,
			"deletedDateTime": null,
			"subject": null,
			"summary": null,
			"chatId": "19:2da4c29f6d7041eca70b638b43d45437@thread.v2",
			"importance": "normal",
			"locale": "en-us",
			"webUrl": null,
			"channelIdentity": null,
			"policyViolation": null,
			"from": null,
			"body": {
				"contentType": "html",
				"content": "<systemEventMessage/>"
			},
			"attachments": [],
			"mentions": [],
			"reactions": [],
			"eventDetail": {
				"@odata.type": "#microsoft.graph.chatRenamedEventMessageDetail",
				"chatId": "19:2da4c29f6d7041eca70b638b43d45437@thread.v2",
				"chatDisplayName": "Graph Members",
				"initiator": {
					"application": null,
					"device": null,
					"user": {
						"id": "1fb8890f-423e-4154-8fbf-db6809bc8756",
						"displayName": null,
						"userIdentityType": "aadUser"
					}
				}
			}
		}
	]
}
```

## Workflow Library Example

[List Chat Messages with Microsoft Teams and Send Results Via Email](https://library.blinkops.com/workflows/list-chat-messages-with-microsoft-teams-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-chat-messages-with-microsoft-teams-and-send-results-via-email/canvas" />
</div>
