Skip to content

Bug report: 'spo commandset remove' does not work as expected #4706

Description

@martinlingstuyl

There are a number of issues with the command spo commandset remove

  • According to the issue specs and the documentation, the default scope option value should be All, meaning that the command will look in all scopes (Site and Web) to find the customaction to delete. However, the default scope in the code is Site.
  • If you specify scope All manually, the command throws. This is because the code is just adding this to the customaction url, while deleting: /_api/All/UserCustomActions. However, this should not be possible, All is our convention, not a valid scope.

To solve these issues a few steps need to be taken:

  • Always find the customaction first, using the spo util functions, also when the --id property is used.
  • Use the scope value of the found customaction in the DELETE HTTP request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions