spo eventreceiver remove
Removes event receivers for the specified web, site, or list.
Usage
m365 spo eventreceiver remove [options]
Options
-u, --webUrl <webUrl>The URL of the web.
--listTitle [listTitle]The title of the list, if the event receiver should be removed from a list. Specify either
listTitle,listIdorlistUrl.--listId [listId]The id of the list, if the event receiver should be retrieved from a list. Specify either
listTitle,listIdorlistUrl.--listUrl [listUrl]The url of the list, if the event receiver should be retrieved from a list. Specify either
listTitle,listIdorlistUrl.-n, --name [name]The name. Specify either
nameoridbut not both.-i, --id [id]The id. Specify either
nameoridbut not both.-s, --scope [scope]The scope. Can be either "site" or "web". Defaults to "web". Only applicable when not specifying any of the list properties.
-f, --forceDon't prompt for confirmation.
-h, --help [help]Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options,examples,remarks,permissions,response,full. Default isoptions.--query [query]JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]Output type.
json,text,csv,md,none. Defaultjson.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Remarks
You can only remove an event receiver if it has been registered by an app with the same ID.
Examples
Remove event receiver in a specific web by name.
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --name 'PnP Test Receiver'
Remove event receiver in a specific site by id.
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --scope site --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec
Remove event receiver in a specific list retrieved by title by name.
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listTitle Events --name 'PnP Test Receiver'
Remove event receiver in a specific list retrieved by list id by id.
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listId '202b8199-b9de-43fd-9737-7f213f51c991' --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec
Remove event receiver in a specific list retrieved by list url by name.
m365 spo eventreceiver remove --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events' --name 'PnP Test Receiver'
Response
The command won't return a response on success.