Skip to content

New command: spo site alert list #6861

@milanholemans

Description

@milanholemans

Usage

m365 spo site alert list [options]

Description

Lists all SharePoint list alerts

Options

Option Description
-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.

Examples

List all alerts for a SharePoint site:

m365 spo site alert list --webUrl https://contoso.sharepoint.com/sites/Marketing

List alerts for a SharePoint list by listUrl:

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

List alerts for a specific user by userId:

m365 spo site 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:

m365 spo site alert list --webUrl https://contoso.sharepoint.com/sites/Marketing --listTitle "Tasks" --userName [email protected]

Default properties

  • id
  • title
  • userId

Additional Info

API request:

GET https://contoso.sharepoint.com/sites/Marketing/_api/Web/Alerts?$expand=List,User,List/Rootfolder,Item&$select=*,List/Id,List/Title,List/Rootfolder/ServerRelativeUrl,Item/ID,Item/FileRef,Item/Guid

We can append filters to the request to filter on either list and/or user.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions