Skip to main content

spo customaction clear

Deletes all custom actions from site or site collection


m365 spo customaction clear [options]


-u, --webUrl <webUrl>

Url of the site or site collection to clear the custom actions from.

-s, --scope [scope]

Scope of the custom action. Allowed values Site, Web, All. Default All.

-f, --force

Don't prompt for confirming removing all custom actions.

-h, --help [help]

Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are options, examples, remarks, response, full. Default is options.

--query [query]

JMESPath query string. See for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.


Runs command with verbose logging.


Runs command with debug logging.


Clears all user custom actions for both site and site collection. Skips the confirmation prompt message.

m365 spo customaction clear --webUrl --force

Clears all user custom actions for the specified site.

m365 spo customaction clear --webUrl --scope Web

Clears all user custom actions for the specified site collection.

m365 spo customaction clear --webUrl --scope Site


The command won't return a response on success.