ms-teams-chat-messages
Retrieves the one-on-one and group chat messages of the specified users using Microsoft Graph API.
Syntax
ms-teams-chat-messages [profile=STRING] user=STRING [duration=STRING] [from=DATETIME] [to=DATETIME] [limit=INT] [include-system=BOOL]
Options
- user=STRING
- Required. User principal name or object ID. Separate multiple users with commas (,). e.g. hong@example.com,user@example.com
- profile=STRING
- Optional. Microsoft Teams Graph API connect profile name. Every registered Microsoft Teams Graph API connect profile is queried when omitted.
- duration=STRING
- Optional. Query only recent messages. e.g. 10m, 1h, 1d
- from=DATETIME
- Optional. Start of the query range. One day before the end by default.
- to=DATETIME
- Optional. End of the query range. The current time by default.
- limit=INT
- Optional. Maximum number of messages to retrieve per user. Specify a positive integer.
- include-system=BOOL
- Optional. Include system event messages such as membership changes. (default: f)
Output fields
| Field | Type | Name | Description |
|---|---|---|---|
| _time | date | Time | Time the message was created |
| profile | string | Connect profile | Microsoft Teams Graph API connect profile name. e.g. ms_teams_graph |
| user | string | Queried user | User whose chat messages were queried. e.g. hong@example.com |
| msg_id | string | Message ID | Message ID |
| chat_id | string | Chat ID | ID of the chat the message belongs to. Shared by every message of the same chat |
| updated | date | Updated | Time the message was last modified. The query range filters on this value |
| msg_type | string | Message type | message, chatEvent, typing, systemEventMessage |
| from_user_id | string | Sender ID | Object ID of the sender. null when the sender is not set |
| from_user_name | string | Sender name | Display name of the sender. e.g. Hong Gildong |
| msg | string | Message | Message body with HTML markup removed. e.g. Sharing the meeting notes |
| content_type | string | Content type | Content type of the original body. html or text |
| importance | string | Importance | normal, high, urgent |