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

# entra m365group recyclebinitem restore

Restores a deleted Microsoft 365 Group

## Usage

```sh
m365 entra m365group recyclebinitem restore [options]
```

## Options

```md definition-list
`-i, --id [id]`
: The ID of the Microsoft 365 Group to restore. Specify either `id`, `displayName` or `mailNickname` but not multiple.

`-d, --displayName [displayName]`
: Display name for the Microsoft 365 Group to restore. Specify either `id`, `displayName` or `mailNickname` but not multiple.

`-m, --mailNickname [mailNickname]`
: Name of the group e-mail (part before the @). Specify either `id`, `displayName` or `mailNickname` but not multiple.
```

<Global />

## Permissions

<Tabs>
  <TabItem value="Delegated">

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

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

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

  </TabItem>
</Tabs>

## Examples

Restores the Microsoft 365 Group with specific ID

```sh
m365 entra m365group recyclebinitem restore --id 28beab62-7540-4db1-a23f-29a6018a3848
```

Restores the Microsoft 365 Group with specific name

```sh
m365 entra m365group recyclebinitem restore --displayName "My Group"
```

Restores the Microsoft 365 Group with specific mail nickname

```sh
m365 entra m365group recyclebinitem restore --mailNickname "Mygroup"
```

## Response

The command won't return a response on success.
