import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import Global from '../../_global.mdx';
Sends a chat message to a Microsoft Teams chat conversation.
m365 teams chat message send [options]`--chatId [chatId]`
: The ID of the chat conversation. Specify either `chatId`, `chatName` or `userEmails`, but not multiple.
`--chatName [chatName]`
: The display name of the chat conversation. Specify either `chatId`, `chatName` or `userEmails`, but not multiple.
`-e, --userEmails [userEmails]`
: A comma-separated list of one or more e-mail addresses. Specify either `chatId`, `chatName` or `userEmails`, but not multiple.
`-m, --message <message>`
: The message to send
`--contentType [contentType]`
: The content type of the message. Allowed values are `text` and `html`. Default is `text`.A new chat conversation will be created if no existing conversation with the participants specified with emails is found.
| Resource | Permissions |
|---|---|
| Microsoft Graph | Chat.Read, ChatMessage.Send |
This command does not support application permissions.
Send a message to a Microsoft Teams chat conversation by id
m365 teams chat message send --chatId 19:[email protected] --message "<b>Welcome</b> to Teams" --contentType htmlSend a message to a single person
m365 teams chat message send --userEmails [email protected] --message "Welcome to Teams"Send a message to a group of people
m365 teams chat message send --userEmails [email protected],[email protected] --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"The command won't return a response on success.