Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions docs/docs/cmd/outlook/event/event-remove.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import Global from '../../_global.mdx';
import TabItem from '@theme/TabItem';
import Tabs from '@theme/Tabs';

# outlook event remove

Removes an event from a calendar

## Usage

```sh
m365 outlook event remove [options]
```

## Options

```md definition-list
`-i, --id <id>`
: ID of the event.

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

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

`--permanent`
: Permanently remove the event, don't send it to the recycle bin.

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

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|---------------------------|
| Microsoft Graph | Calendars.ReadWrite |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|--------------------------------|
| Microsoft Graph | Calendars.ReadWrite |

</TabItem>
</Tabs>

## Remarks

:::warning

When using the `--permanent` option, the event will be permanently deleted and cannot be recovered.

:::

## Examples

Remove a calendar event from the current logged-in user

```sh
m365 outlook event remove --id AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAENAAAiIsqMbYjsT5e-T7KzowPTAAAa_WKzAAA=
```

Permanently remove a calendar event from a specific user

```sh
m365 outlook event remove --userName "[email protected]" --permanent --id AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAENAAAiIsqMbYjsT5e-T7KzowPTAAAa_WKzAAA=
```

Remove a calendar event from a specific user specified by user ID

```sh
m365 outlook event remove --userId 6799fd1a-723b-4eb7-8e52-41ae530274ca --id AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OABGAAAAAAAiQ8W967B7TKBjgx9rVEURBwAiIsqMbYjsT5e-T7KzowPTAAAAAAENAAAiIsqMbYjsT5e-T7KzowPTAAAa_WKzAAA=
```

## Response

The command won't return a response on success.
9 changes: 9 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,15 @@ const sidebars: SidebarsConfig = {
},
{
'Outlook (outlook)': [
{
event: [
{
type: 'doc',
label: 'event remove',
id: 'cmd/outlook/event/event-remove'
}
]
},
{
mail: [
{
Expand Down
1 change: 1 addition & 0 deletions src/m365/outlook/commands.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const prefix: string = 'outlook';

export default {
EVENT_REMOVE: `${prefix} event remove`,
MAIL_SEARCHFOLDER_ADD: `${prefix} mail searchfolder add`,
MAIL_SEND: `${prefix} mail send`,
MAILBOX_SETTINGS_GET: `${prefix} mailbox settings get`,
Expand Down
Loading