Skip to content

New command: spo tenant applicationcustomizer add #4220

Description

@martinlingstuyl

Usage

spo tenant applicationcustomizer add

Description

Add an application customizer as a tenant wide extension.

Options

Option Description
-t, --title <title> The title of the Application Customizer
-i, --clientSideComponentId <clientSideComponentId> The Client Side Component Id (GUID) of the application customizer.
--clientSideComponentProperties [clientSideComponentProperties] The Client Side Component properties of the application customizer.
--webTemplate [webTemplate] Optionally add a web template (e.g. STS#3, SITEPAGEPUBLISHING#0, etc) as a filter for what kind of sites the application customizer is registered on.

Examples

Adds an application customizer that's deployed tenant wide

m365 spo tenant applicationcustomizer add --title "Some customizer" --clientSideComponentId  799883f5-7962-4384-a10a-105adaec6ffc 

Adds an application customizer that is configured for all communication sites.

m365 spo tenant applicationcustomizer add --title "Some customizer" --clientSideComponentId  799883f5-7962-4384-a10a-105adaec6ffc --webTemplate "SITEPAGEPUBLISHING#0"

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

Some things to consider while building.

  • we need to insert an item in the TenantWideExtensions list for this command. We can reuse the existing listitem add command for that.
  • we need to check if an app package is available and if skipFeatureDeployment is enabled / the app is deployed to all sites, otherwise the addition to the TenantWideExtensions list will fail.
  • we need to check if the app package contains an extension that can be deployed tenant wide.
  • We would need a note in the docs saying you need to be a SharePoint admin to deploy tenant wide.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions