Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 2.1 KB

message-remove.mdx

File metadata and controls

67 lines (42 loc) · 2.1 KB

import Global from '/docs/cmd/_global.mdx';

outlook message remove

Permanently removes a specific message from a mailbox

Usage

m365 outlook message remove [options]

Options

`-i, --id <id>`
: ID of the message.

`--userId [userId]`
: ID of the user that owns the mailbox. Specify either `userId` or `userName`, but not both. This option is required when using application permissions.

`--userName [userName]`
: User principal name of the user that owns the mailbox. Specify either `userId` or `userName`, but not both. This option is required when using application permissions.

`-f, --force`
: Don't prompt for confirmation.

Remarks

:::warning

This command will permanently delete the Outlook message. To move a message to the trash bin, use outlook message move instead.

:::

Examples

Remove a specific message for the currently signed-in user

m365 outlook message remove --id AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEMAAAiIsqMbYjsT5e-T7KzowPTAALvuv07AAA=

Remove a specific message in a shared mailbox

m365 outlook message remove --id AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEMAAAiIsqMbYjsT5e-T7KzowPTAALvuv07AAA= --userName sharedmailbox@contoso.com

Remove a specific message from a specific mailbox specified by user ID using application permissions

m365 outlook message remove --id AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEMAAAiIsqMbYjsT5e-T7KzowPTAALvuv07AAA= --userId 6799fd1a-723b-4eb7-8e52-41ae530274ca

Remove a specific message from a specific mailbox specified by user UPN using application permissions

m365 outlook message remove --id AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAEMAAAiIsqMbYjsT5e-T7KzowPTAALvuv07AAA= --userName john.doe@contoso.com

Response

The command won't return a response on success.