Skip to content

New command: spo applicationcustomizer add #3465

@martinlingstuyl

Description

@martinlingstuyl

Usage

spo applicationcustomizer add

Description

Add an application customizer to a site.

Options

Option Description
-t, --title <title> The title of the Application Customizer
-u, --webUrl <webUrl> The site to add the Application Customizer on.
-i, --clientSideComponentId <clientSideComponentId> The Client Side Component Id (GUID) of the application customizer.
--clientSideComponentProperties [clientSideComponentProperties] The Client Side Component properties of the application customizer.

Examples

Adds an application customizer to the sales site.

m365 spo applicationcustomizer add --title "Some customizer" --clientSideComponentId  799883f5-7962-4384-a10a-105adaec6ffc --webUrl https://contoso.sharepoint.com/sites/sales

Adds an application customizer to the sales site with some properties.

m365 spo applicationcustomizer add --title "Some customizer" --clientSideComponentId  799883f5-7962-4384-a10a-105adaec6ffc --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

This functionality can be achieved by the spo customaction commands. However, I'm lazy... I don't want to search for what options I need for an application customizer.

We should reuse the functionality though.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions