Skip to content

Latest commit

 

History

History
85 lines (55 loc) · 2.08 KB

File metadata and controls

85 lines (55 loc) · 2.08 KB

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import Global from '../../_global.mdx';

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` 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`.

Remarks

A new chat conversation will be created if no existing conversation with the participants specified with emails is found.

Permissions

Resource Permissions
Microsoft Graph Chat.Read, ChatMessage.Send

This command does not support application permissions.

Examples

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 html

Send 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"

Response

The command won't return a response on success.