teams message remove
Removes a message from a channel in a Microsoft Teams team
Usage
m365 teams message remove [options]
Options
--teamId [teamId]ID of the Microsoft Teams team. Specify either
teamIdorteamNamebut not both.--teamName [teamName]Name of the Microsoft Teams team. Specify either
teamIdorteamNamebut not both.--channelId [channelId]Channel ID of the Microsoft Teams team. Specify either
channelIdorchannelNamebut not both.--channelName [channelName]Channel name of the Microsoft Teams team. Specify either
channelIdorchannelNamebut not both.-i, --id <id>The ID of the Teams message.
-f, --forceDon't prompt for confirmation.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,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.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Remarks
This command does only support delegated permissions.
You can only remove Microsoft Teams messages that you created yourself.
Examples
Remove a message by using IDs
m365 teams message remove --teamId 5f5d7b71-1161-44d8-bcc1-3da710eb4171 --channelId 19:4a95f7d8db4c4e7fae857bcebe0623e6@thread.tacv2 --id 1540747442203
Remove a message by using display names
m365 teams message remove --teamName Marketing --channelName Branding --id 1540747442203
Response
The command won't return a response on success.