Skip to main content

teams message attachments delete

Auto-generated reference

This page is generated from checked-in CLI metadata for release v0.11.0. Do not edit it by hand.

Delete files you attached from your OneDrive (the message itself is kept)

Synopsis​

teams message attachments delete (--team <TEAM> --channel <CHANNEL> [--reply <REPLY>] | --chat <CHAT>) (MESSAGE_ID | --message <MESSAGE>) [--index <INDEX>] --yes

Options​

OptionValueRequiredEnvDefaultDescription
--teamTEAMnoTeam ID (for channel messages; requires --channel)
--channelCHANNELnoChannel ID (for channel messages; requires --team)
--chatCHATnoChat ID (for chat messages)
--replyREPLYnoReply ID (for a reply within a channel thread)
MESSAGE_IDMESSAGE_IDnoMessage ID
--messageMESSAGEnoMessage ID
--indexINDEXnoDelete only the item with this index (from attachments list)
--yesYESnofalseConfirm the deletion; without it the command exits with code 2 and sends nothing

Examples​

No command-specific examples are published yet.

Exit Codes​

CodeMeaning
0success
1general error
2invalid input
3authentication error
4permission denied
6rate limited

See Also​