Skip to content

Bug report: 'spo commandset set' does not work as expected #4710

Closed
@martinlingstuyl

Description

@martinlingstuyl

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

  • 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 update. 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 PATCH HTTP request.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions