-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Category
- Question
- Typo
- Bug
- Additional article idea
Expected or Desired Behavior
When applying a site design with a site script that includes the 'installSolution' verb, when creating a site based on the site design or applying the site design manually, the app should be installed to the site automatically. This does not work as expected.
Observed Behavior
The installation of an app to a site though site script only works in the following cases: Create a site through SharePoint Home and select the site design, or Create a site though SharePoint admin center and select the site design and open the site immediatley after the site has been created. If applying site design on an already created design through 'Site settings' > 'Site Designs', or if you want more than 30 seconds after creating the site from admin center and then opening the site in the browser, the installation step fails and app is not installed. In 'Site Design' view on the site, it says 'Action failed' on the app installation step.
Steps to Reproduce
We can reproduce with any SPFX package in any environment. Office365 support could also reproduce the issue, but could not help us since they claimed it's a development related issue.
- Install an SPFX solution to the tenant app catalog (i.e. default solution generated by yo @microsoft/sharepoint). Do not make it tenant deployed automatically on all sites.
- Create a site script and site design and replace the id guid with the unique ID of the app. Install the site script and site design on the tenant with SPO Powershell.
{
"$schema": "schema.json",
"actions": [
{
"verb": "installSolution",
"id": "a53b0fd0-ca40-42c5-b3c4-8b894431220a"
}
],
"version": 1
}
3a. Create a site collection with the site design through SharePoint Online Admin Center. Wait 30 seconds. Then open the site the browser. Installation of app fails.
3b. Create a site collection based with Blank Communication site. Open the site in the browser. Through the 'Site Design' in the UI, apply the site design manually. Installation of app fails.
The following scenario works though:
3c. Create a site collection with the site design through SharePoint Home. After the site has been created the user gets redirected to the site directly. Site design and app installation step is completed with no issues.