Closed
Description
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
andWeb
) to find the customaction to update. However, the default scope in the code isSite
. - 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.