Skip to main content

Send Your First Teams Message

Before writing

Use a test team, channel, or chat. Message sends require delegated auth for normal live Teams usage.

teams auth login --device-code
teams auth doctor --output json | jq '.data.token.auth_type'

The token type should be delegated.

Channel message

teams message send \
--team "$TEAM_ID" \
--channel "$CHANNEL_ID" \
--body "Release 2.4.1 is deployed." \
--output json

Chat message

teams message send --chat "$CHAT_ID" --body "The test run passed." --output json

For app-only token errors, read client credentials.