Usage
spo applicationcustomizer set
Description
Updates an existing application customizer on a site.
Options
| Option |
Description |
-u, --webUrl <webUrl> |
The site to update the Application Customizer on. |
-t, --title [title] |
The title of the Application Customizer to update. Specify either title, id or clientSideComponentId. |
-i, --id [id] |
The id of the Application Customizer to update. Specify either title, id or clientSideComponentId. |
-c, --clientSideComponentId [clientSideComponentId] |
The Client Side Component Id (GUID) of the Application Customizer to update. Specify either title, id or clientSideComponentId. |
--newTitle [newTitle] |
The updated title of the Application Customizer |
--clientSideComponentProperties [clientSideComponentProperties] |
The Client Side Component properties of the application customizer. |
-s, --scope [scope] |
The scope where to lookup the ListView Command Set: at site level or web level. Allowed values: Site, Web, All. Defaults to All. |
Examples
Updates the title of an application customizer on the sales site.
m365 spo applicationcustomizer set --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --newTitle "Some customizer" --webUrl https://contoso.sharepoint.com/sites/sales
Updates the properties of an application customizer on the sales site.
m365 spo applicationcustomizer set --id 058140e3-0e37-44fc-a1d3-79c487d371a3 --clientSideComponentProperties '{ "someProperty": "Some value" }' --webUrl https://contoso.sharepoint.com/sites/sales
Remarks
Add the following notice (like on https://pnp.github.io/cli-microsoft365/cmd/spo/customaction/customaction-add/)
Escaping JSON in PowerShell When using the --clientSideComponentProperties option it's possible to enter a JSON string. In PowerShell 5 to 7.2 specific escaping rules apply due to an issue. Remember that you can also use file tokens instead.
Additional Info
While developing we want to reuse the getCustomActions and getCustomActionById functions of the spo util class.
- If the found custom action is not an Application Customizer: throw an error.
- If two or more Application Customizer custom actions are found: prompt the user to disambiguate.
We can use the shared code to only query the right type of customaction with a location value of ClientSideExtension.ApplicationCustomizer.
Usage
spo applicationcustomizer set
Description
Updates an existing application customizer on a site.
Options
-u, --webUrl <webUrl>-t, --title [title]title,idorclientSideComponentId.-i, --id [id]title,idorclientSideComponentId.-c, --clientSideComponentId [clientSideComponentId]title,idorclientSideComponentId.--newTitle [newTitle]--clientSideComponentProperties [clientSideComponentProperties]-s, --scope [scope]Site,Web,All. Defaults toAll.Examples
Updates the title of an application customizer on the sales site.
Updates the properties of an application customizer on the sales site.
Remarks
Add the following notice (like on https://pnp.github.io/cli-microsoft365/cmd/spo/customaction/customaction-add/)
Additional Info
While developing we want to reuse the
getCustomActionsandgetCustomActionByIdfunctions of the spo util class.We can use the shared code to only query the right type of customaction with a location value of
ClientSideExtension.ApplicationCustomizer.