cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

New command: `teams message restore`

Open milanholemans opened this issue 1 year ago • 1 comments

Usage

m365 teams message restore [options]

Description

Restores a deleted message from a channel in a Microsoft Teams team

Options

Option Description
--teamId [teamId] ID of the Microsoft Teams team. Specify either teamId or teamName but not both.
--teamName [teamName] Name of the Microsoft Teams team. Specify either teamId or teamName but not both.
--channelId [channelId] Channel ID of the Microsoft Teams team. Specify either channelId or channelName but not both.
--channelName [channelName] Channel name of the Microsoft Teams team. Specify either channelId or channelName but not both.
-i, --id <id> The ID of the Teams message.
-f, --force Don't prompt for confirmation.

Examples

Restores a deleted message by using IDs

m365 teams message restore --teamId 5f5d7b71-1161-44d8-bcc1-3da710eb4171 --channelId 19:[email protected] --id 1540747442203

Restores a deleted message by using display names

m365 teams message restore --teamName Marketing --channelName Branding --id 1540747442203

Default properties

No response

Additional Info

Remarks:

  • This command doesn't support application permissions, let's check for this

API: https://learn.microsoft.com/en-us/graph/api/chatmessage-undosoftdelete?view=graph-rest-1.0&tabs=http

milanholemans avatar Feb 16 '24 23:02 milanholemans

LGTM 👍 Let's ship it 🚢

Adam-it avatar Feb 18 '24 23:02 Adam-it

Hi There, can I give this a try? 😄

nicodecleyre avatar Mar 25 '24 10:03 nicodecleyre