import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# planner roster member remove

Removes a member from a Microsoft Planner Roster

## Usage

```sh
m365 planner roster member remove [options]
```

## Options

```md definition-list
`--rosterId <rosterId>`
: ID of the Planner Roster.

`--userId [userId]`
: User's Microsoft Entra ID. Specify either `userId` or `userName` but not both.

`--userName [userName]`
: User's UPN (user principal name, e.g. johndoe@example.com). Specify either `userId` or `userName` but not both.

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

<Global />

## Remarks

:::warning

This command is based on an API that is currently in preview and is subject to change once the API reached general availability.

:::

:::warning

The Planner Roster will be deleted when it doesn't have any users remaining in the membership list because the last user removed themselves. Roster, its plan and all contained tasks will be deleted within 30 days of this operation. We will show an extra prompt when this happens. This prompt is also suppressed when specifying `-f, --force`.

:::

## Permissions

<Tabs>
  <TabItem value="Delegated">

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

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

  | Resource        | Permissions         |
  |-----------------|---------------------|
  | Microsoft Graph | Tasks.ReadWrite.All |

  </TabItem>
</Tabs>

## Examples

Remove a Roster member by its Microsoft Entra ID.

```sh
m365 planner roster member remove --rosterId 8bc07d47-c06f-41e1-8f00-1c113c8f6067 --userId 126878e5-d8f9-4db2-951d-d25486488d38
```

Remove a Roster member by its UPN.

```sh
m365 planner roster member remove --rosterId 8bc07d47-c06f-41e1-8f00-1c113c8f6067 --userName john.doe@contoso.com
```

## Response

The command won't return a response on success.
