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

# spo web alert list

Lists all SharePoint list alerts

## Usage

```sh
m365 spo web alert list [options]
```

## Options

```md definition-list
`-u, --webUrl <webUrl>`
: The URL of the SharePoint site.

`--listId [listId]`
: The ID of the SharePoint list. Specify either `listId`, `listUrl`, or `listTitle`, but not more than one.

`--listUrl [listUrl]`
: The URL of the SharePoint list. Specify either `listId`, `listUrl`, or `listTitle`, but not more than one.

`--listTitle [listTitle]`
: The title of the SharePoint list. Specify either `listId`, `listUrl`, or `listTitle`, but not more than one.

`--userName [userName]`
: The user name to filter alerts for. Specify either `userName` or `userId`, but not both.

`--userId [userId]`
: The user ID to filter alerts for. Specify either `userName` or `userId`, but not both.
```

<Global />

## Permissions

<Tabs>
  <TabItem value="Delegated">

  | Resource   | Permissions          |
  |------------|----------------------|
  | SharePoint | AllSites.FullControl |

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

  | Resource   | Permissions           |
  |------------|-----------------------|
  | SharePoint | Sites.FullControl.All |

  </TabItem>
</Tabs>

## Examples

List all alerts for a SharePoint site:

```sh
m365 spo web alert list --webUrl https://contoso.sharepoint.com/sites/Marketing
```

List alerts for a SharePoint list by listUrl:

```sh
m365 spo web alert list --webUrl https://contoso.sharepoint.com/sites/Marketing --listUrl /sites/Marketing/lists/Tasks
```

List alerts for a specific user by userId:

```sh
m365 spo web alert list --webUrl https://contoso.sharepoint.com/sites/Marketing --userId 7cbb4c8d-8e4d-4d2e-9c6f-3f1d8b2e6a0e
```

List alerts for a specific list by title and user by username:

```sh
m365 spo web alert list --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle "Tasks" --userName jane.doe@contoso.com
```

## Response

<Tabs>
  <TabItem value="JSON">

  ```json
  [
    {
      "AlertFrequency": 0,
      "AlertTemplateName": "SPAlertTemplateType.DocumentLibrary",
      "AlertType": 1,
      "AlwaysNotify": false,
      "DeliveryChannels": 1,
      "EventType": -1,
      "Filter": "",
      "ID": "c52b4bf0-add0-4323-b670-f765bb46337b",
      "Properties": [
        {
          "Key": "dispformurl",
          "Value": "Shared Documents/Forms/DispForm.aspx",
          "ValueType": "Edm.String"
        }
      ],
      "Status": 0,
      "Title": "Documents: ProjectPlan.docx",
      "UserId": 9,
      "Item": {
        "Id": 37326,
        "FileRef": "/sites/marketing/Shared Documents/ProjectPlan.docx",
        "GUID": "ef5cc60b-71c0-4357-a291-14274234efde"
      },
      "List": {
        "Id": "6b4f195c-02da-47f4-8237-065b96258cf3",
        "Title": "Documents",
        "RootFolder": {
          "ServerRelativeUrl": "/sites/marketing/Shared Documents"
        }
      },
      "User": {
        "Id": 9,
        "IsHiddenInUI": false,
        "LoginName": "i:0#.f|membership|jane.doe@contoso.onmicrosoft.com",
        "Title": "Jane Doe",
        "PrincipalType": 1,
        "Email": "jane.doe@contoso.onmicrosoft.com",
        "Expiration": "",
        "IsEmailAuthenticationGuestUser": false,
        "IsShareByEmailGuestUser": false,
        "IsSiteAdmin": false,
        "UserId": {
          "NameId": "10037ffeaed549a5",
          "NameIdIssuer": "urn:federation:microsoftonline"
        },
        "UserPrincipalName": "jane.doe@contoso.onmicrosoft.com"
      }
    }
  ]
  ```

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

  ```txt
  ID                                    Title                        UserPrincipalName
  ------------------------------------  ---------------------------  --------------------
  fa5115ee-0c72-4d17-9fda-ee2451ba1c6d  Documents: ProjectPlan.docx  jane.doe@contoso.com
  ```

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

  ```csv
  AlertFrequency,AlertTemplateName,AlertType,AlwaysNotify,DeliveryChannels,EventType,Filter,ID,Status,Title,UserId,UserPrincipalName
  0,SPAlertTemplateType.DocumentLibrary,1,0,1,-1,,fa5115ee-0c72-4d17-9fda-ee2451ba1c6d,0,Documents: ProjectPlan.docx,6,jane.doe@contoso.com
  ```

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

  ```md
  # spo web alert list --webUrl "https://contoso.sharepoint.com/sites/marketing" --listUrl "/sites/marketing/Shared Documents"

  Date: 10/6/2025

  ## Documents: ProjectPlan.docx (c52b4bf0-add0-4323-b670-f765bb46337b)

  Property | Value
  ---------|-------
  AlertFrequency | 0
  AlertTemplateName | SPAlertTemplateType.DocumentLibrary
  AlertType | 1
  AlwaysNotify | false
  DeliveryChannels | 1
  EventType | -1
  Filter |
  ID | c52b4bf0-add0-4323-b670-f765bb46337b
  Status | 0
  Title | Documents: ProjectPlan.docx
  UserId | 9
  UserPrincipalName | jane.doe@contoso.com
  ```

  </TabItem>
</Tabs>
