Skip to main content

Send chat message

Send a message into an existing Teams chat, or straight to one person, starting a one-on-one chat with them when needed.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/send_chat_message · 8 inputs (1 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
Chat IDStringNoChat id, e.g. from Create chat; or give to instead.
MessageStringYesMessage text (HTML allowed when html is true).
Body is HTMLBooleanNofalseMessage is HTML.
ImportanceStringNonormalImportance of the message.
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.
ToStringNoPerson's email address or user id; their one-on-one chat with the signed-in user is used, or started. Used instead of chat_id.
MentionsListNoPeople in the chat to @mention, by email address or user id. Write @[ann@contoso.com] in the message where a mention goes; others are put at the start.

Outputs​

OutputTypeWhat it is
message_idStringMessage id.
chat_idStringChat the message went to.