Microsoft Teams

Download 33
Last updated Nov 20, 2026

ms-teams-chat-messages-batch

Retrieves the chat messages of each user in the input rows in batch using Microsoft Graph API.

Syntax

ms-teams-chat-messages-batch profile=STRING [user-field=STRING] [duration=STRING] [from=DATETIME] [to=DATETIME] [limit=INT] [include-system=BOOL]

Options

profile=STRING
Required. Microsoft Teams Graph API connect profile name. Only one profile is allowed.
user-field=STRING
Optional. Input field that holds the user principal name or object ID. (default: user)
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 input row. Specify a positive integer.
include-system=BOOL
Optional. Include system event messages such as membership changes. (default: f)

Input fields

FieldTypeRequiredDescription
userstringYUser principal name or object ID to query. e.g. hong@example.com. Use the user-field option to read another field name

Output fields

FieldTypeNameDescription
_timedateTimeTime the message was created
profilestringConnect profileMicrosoft Teams Graph API connect profile name. e.g. ms_teams_graph
userstringQueried userUser whose chat messages were queried. e.g. hong@example.com
msg_idstringMessage IDMessage ID
chat_idstringChat IDID of the chat the message belongs to. Shared by every message of the same chat
updateddateUpdatedTime the message was last modified. The query range filters on this value
msg_typestringMessage typemessage, chatEvent, typing, systemEventMessage
from_user_idstringSender IDObject ID of the sender. null when the sender is not set
from_user_namestringSender nameDisplay name of the sender. e.g. Hong Gildong
msgstringMessageMessage body with HTML markup removed. e.g. Sharing the meeting notes
content_typestringContent typeContent type of the original body. html or text
importancestringImportancenormal, high, urgent
_errorstringErrorError message for invalid input or API failure. Present only on failed input rows