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

# outlook calendargroup list

Retrieves calendar groups for a user.

## Usage

```sh
m365 outlook calendargroup list [options]
```

## Options

```md definition-list
`--userId [userId]`
: ID of the user whose calendar groups to retrieve. Specify either `userId` or `userName`, but not both.  

`--userName [userName]`
: UPN of the user whose calendar groups to retrieve. Specify either `userId` or `userName`, but not both. 
```

<Global />

## Permissions

<Tabs>
  <TabItem value="Delegated">

  | Resource        | Permissions                                                                          |
  |-----------------|--------------------------------------------------------------------------------------|
  | Microsoft Graph | Calendars.ReadBasic, Calendars.Read, Calendars.Read.Shared, Calendars.ReadWrite.Shared |

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

  | Resource        | Permissions                         |
  |-----------------|-------------------------------------|
  | Microsoft Graph | Calendars.ReadBasic, Calendars.Read |

  </TabItem>
</Tabs>

:::note

When using delegated permissions, specifying `userId` or `userName` for a different user requires the `Calendars.Read.Shared` or `Calendars.ReadWrite.Shared` scope. When the specified user matches the signed-in user, no shared scope is needed.

:::

## Examples

Retrieve all calendar groups for the signed-in user.

```sh
m365 outlook calendargroup list
```

Retrieve all calendar groups for a specific user by email.

```sh
m365 outlook calendargroup list --userName "john.doe@contoso.com"
```

Retrieve all calendar groups for a specific user by ID.

```sh
m365 outlook calendargroup list --userId b743445a-112c-4fda-9afd-05943f9c7b36
```

## Response

<Tabs>
  <TabItem value="JSON">

  ```json
  [
    {
      "id": "AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA=",
      "name": "My Calendars",
      "changeKey": "nfZyf7VcrEKLNoU37KWlkQAAA0x0+w==",
      "classId": "0006f0b7-0000-0000-c000-000000000046"
    }
  ]
  ```

  </TabItem>
  <TabItem value="Text">

  ```text
  id                                                                                                                     name
  ----------------------------------------------------------------------------------------------------------------------  ------------
  AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA=  My Calendars
  ```

  </TabItem>
  <TabItem value="CSV">

  ```csv
  id,name
  AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA=,My Calendars
  ```

  </TabItem>
  <TabItem value="Markdown">

  ```md
  # outlook calendargroup list

  Date: 2/24/2026

  Property | Value
  ---------|-------
  id | AAMkAGE0MGM1Y2M5LWEzMmUtNGVlNy05MjRlLTk0YmYyY2I5NTM3ZAAuAAAAAAC_0WfqSjt_SqLtNkuO-bj1AQAbfYq5lmBxQ6a4t1fGbeYAAAAAAEOAAA=
  name | My Calendars
  ```

  </TabItem>
</Tabs>
