Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: spo tenant applicationcustomizer add #4220

Closed
Tracked by #4219
martinlingstuyl opened this issue Dec 11, 2022 · 3 comments
Closed
Tracked by #4219

New command: spo tenant applicationcustomizer add #4220

martinlingstuyl opened this issue Dec 11, 2022 · 3 comments
Assignees
Milestone

Comments

@martinlingstuyl
Copy link
Contributor

martinlingstuyl commented Dec 11, 2022

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.
@martinlingstuyl
Copy link
Contributor Author

Hi @MathijsVerbeeck, I’ll assign you on this one as well, as you’ve practically built it already. That is OK I assume?

@MathijsVerbeeck
Copy link
Contributor

Sure, go ahead! I've been quite busy lately, but I'll get working on it :-)

@milanholemans
Copy link
Contributor

No pressure @MathijsVerbeeck 😊

@martinlingstuyl martinlingstuyl changed the title New command: spo tenant applicationcustomizer ensure New command: spo tenant applicationcustomizer add Dec 22, 2022
@martinlingstuyl martinlingstuyl added this to the v6.3 milestone Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants