chatMessage resource type

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported.

Represents an individual chat message within a channel or chat. The chat message can be a root chat message or part of a reply thread that is defined by the replyToId property in the chat message.

Methods

Method Return Type Description
List channel chatMessage chatMessage collection List of all root chat messages in a channel.
Get chatMessages in a channel delta chatMessage Get incremental chat messages in a channel.
Get channel chatMessage chatMessage Get a single root chat message from a channel.
List replies to a chatMessage chatMessage collection List of all replies to a chat message in channel.
Get a reply to a chatMessage chatMessage Get a single reply to a chat message in a channel.
Create chatMessage in a channel chatMessage Create a new top-level chat message in a channel.
Reply to a chatMessage in a channel chatMessage Reply to an existing chat message in a channel.
Create chatMessage in a chat chatMessage Send a chat message in an existing 1:1 or group chat conversation.
List chatMessages in a chat chatMessage List chat messages in a 1:1 or group chat.
Get chatMessage in chat chatMessage Get a single chat message in a chat.
List all hosted content chatMessageHostedContent collection Get all hosted content in a chat message.
Get hosted content chatMessageHostedContent Get hosted content from a chat message.

Properties

Property Type Description
id String Read-only. Unique Id of the message.
replyToId string Read-only. Id of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels not chats)
from identitySet Read only. Details of the sender of the chat message.
etag string Read-only. Version number of the chat message.
messageType chatMessageType The type of chat message. The possible values are: message.
createdDateTime dateTimeOffset Read only. Timestamp of when the chat message was created.
lastModifiedDateTime dateTimeOffset Read only. Timestamp of when the chat message is created or edited, including when a reply is made (if it's a root chat message in a channel) or a reaction is added or removed.
deletedDateTime dateTimeOffset Read only. Timestamp at which the chat message was deleted, or null if not deleted.
subject string The subject of the chat message, in plaintext.
body itemBody Plaintext/HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. The content is always in HTML if the chat message contains a chatMessageMention.
summary string Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat.
attachments chatMessageAttachment collection Attached files. Attachments are currently read-only – sending attachments is not supported.
mentions chatMessageMention collection List of entities mentioned in the chat message. Currently supports user, bot, team, channel.
importance chatMessageImportance The importance of the chat message. The possible values are: normal, high, urgent.
reactions chatMessageReaction collection Reactions for this chat message (for example, Like).
locale string Locale of the chat message set by the client.

JSON representation

The following is a JSON representation of the resource.

{
  "id": "string (identifier)",
  "replyToId": "string (identifier)",
  "from": {"@odata.type": "microsoft.graph.identitySet"},
  "etag": "string",
  "messageType": "string",
  "createdDateTime": "string (timestamp)",
  "lastModifiedDateTime": "string (timestamp)",
  "deletedDateTime": "string (timestamp)",
  "subject": "string",
  "body": {"@odata.type": "microsoft.graph.itemBody"},
  "summary": "string",
  "attachments": [{"@odata.type": "microsoft.graph.chatMessageAttachment"}],
  "mentions": [{"@odata.type": "microsoft.graph.chatMessageMention"}],
  "importance": "string",
  "policyViolation": "string",
  "reactions": [{"@odata.type": "microsoft.graph.chatMessageReaction"}],
  "locale": "string",
  "deleted": true
}