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.
There are a number of issues with the command spo commandset set
All, meaning that the command will look in all scopes (SiteandWeb) to find the customaction to update. However, the default scope in the code isSite.Allmanually, 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:
spoutil functions, also when the--idproperty is used.scopevalue of the found customaction in the PATCH HTTP request.