teams chat message send
Sends a chat message to a Microsoft Teams chat conversation.
Usage
m365 teams chat message send [options]
Options
--chatId [chatId]
The ID of the chat conversation. Specify either
chatId
,chatName
oruserEmails
, but not multiple.--chatName [chatName]
The display name of the chat conversation. Specify either
chatId
,chatName
oruserEmails
, but not multiple.-e, --userEmails [userEmails]
A comma-separated list of one or more e-mail addresses. Specify either
chatId
,chatName
oruserEmails
, but not multiple.-m, --message <message>
The message to send
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
A new chat conversation will be created if no existing conversation with the participants specified with emails is found.
Examples
Send a message to a Microsoft Teams chat conversation by id
m365 teams chat message send --chatId 19:2da4c29f6d7041eca70b638b43d45437@thread.v2 --message "Welcome to Teams"
Send a message to a single person
m365 teams chat message send --userEmails alexw@contoso.com --message "Welcome to Teams"
Send a message to a group of people
m365 teams chat message send --userEmails alexw@contoso.com,meganb@contoso.com --message "Welcome to Teams"
Send a message to a chat conversation finding it by display name
m365 teams chat message send --chatName "Just a conversation" --message "Welcome to Teams"
Response
The command won't return a response on success.