Domanda

When trying to deploy a SPFx Extension tenant wide, I get an error of "Sorry, something went wrong."

The extension works locally. It also works if I install it to individual sites. We want to deploy it to a specific collection for testing and then to /sites/ after testing. I add the app to Site Contents of our App Catalog > go to deployment > specify the collection to deploy it to > hit OK > then I get this message

Sorry, something went wrong

This method has worked well for deploying custom SharePoint apps in the past. This is the first SPFx we have tried it with.

I have also tried to role it out tenant wide by setting skipFeatureDeployment to true and checking the box for "Make this solution available to all sites in the organization". The deploy dialog box goes away but nothing installs. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/tenant-scoped-deployment. I double-checked the console confirm the extension didn't get rolled out.

I have tried this with heavily modified extension and a simple HelloWorld extension. I get the same results with both.

Any help would be much appreciated!

È stato utile?

Soluzione

With regards to extensions, you need to separate the deployment from the activation. You can deploy any SharePoint Framework solution in a tenant-wide manner to all sites at once. As Rob pointed out, in the tenant-wide deployment, the standard feature that activates the extension on the particular site is not activated, so while your extension is deployed it is not enabled on any site. So to enable your extension, you would have to provision a custom action on each site, which is exactly what the standard feature is doing when you deploy your solution to a specific site. You can provision the custom action in a number of ways: using the REST API, CSOM, PowerShell or the Office 365 CLI.

Using the Office 365 CLI for example, you would execute:

spo customaction add --url https://contoso.sharepoint.com/sites/test --title "AppCustomizer" --name "AppCustomizer" --location "ClientSideExtension.ApplicationCustomizer" --clientSideComponentId  b41916e7-e69d-467f-b37f-ff8ecf8f99f2 --clientSideComponentProperties  '{"testMessage":"Test message"}'

The url is the URL of the site/web where you want to install the extension. The title and name are for your administration to help you keep track of the extension and the custom action. The location determines where you extension should be registered. clientSideComponentId corresponds to the ID of your extension. clientSideComponentProperties is an optional JSON string that contains properties that you would like to set on that instance of your extension.

When using PnP PowerShell, you would do the same using the Add-PnPCustomAction cmdlet.

Altri suggerimenti

May 2019 Update:

Tenant Wide Deployment for SharePoint Framework Extensions is supported for application customizers and for List View Command Sets in SPFx 1.6 and later.

Tenant Wide Deployment of SharePoint Framework Extensions


You can't deploy SPFx extensions tenant wide. Each of the extensions (application customizer, field customizer, and list view command set) use Features to associate the extension with the component the extension is targeting. Deploying tenant wide (or site collection wide if you're using the site collection App Catalog) bypasses Feature activation so the extension will never be associated with the target.

If you look at the getting started tutorials for each of the extensions you'll notice they are not configured for tenant wide deployment.

Application customizer

Field customizer

List view command set

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top