Add WSP Solution to Office 365 Group Site

Frequent Contributor

Good morning, 


I have a workflow that utilizes a Solution to generate a templated subsite when a list item is created. This works great on non-Office 365 Group SharePoint sites, but I was hoping to utilize the other features of Groups and still have the benefits of the subsite setup that I have in place.


I understand I am blocked from doing this from the GUI, which is fine because I want to do it from PowerShell (PnP) anyway. I'm trying to use Install-PnPSoltion but am getting a permissions error. I'm an owner of the Group (and actually manually gave myself Administrator access). 


Help? Is this possible? Should I do this another way? Where should the WSP Template be stored for use in my Powershell script?





9 Replies
Group sites are "special" sites and if PnP is dropping errors when trying to upload a WSP to the Sandbox solution gallery could be due to the fact is a not-supported operation. By the way: are you aware that Sandbox solutions are being deprecated? Not in the case of WSPs that contains declarative stuff (such as a workflow. How did you generate the WSP for the workflow?

When I save a site template, it saves it to the solutions gallery. I then want to populate that elsewhere (to about 150 other site collections, that are identical) using Powershell, or another method. This would allow me to make a change to one template and populate it elsewhere without having to do so manually.

That's not the way to go: using the save as template feature for sites...the scenario you are describing fits really well with the capabilities provided by the PnP Provisioning engine and cmdlets

So I want to spin up a subsite with a certain set of libraries (with content types) and lists in it, every time someone submits a list item. 


How would you recommend I do that?

One approach could be to use a Web Job published in Azure that just reads the subsite definition extracted by means of the PnP cmdlets and apply it when creating the new sites....the Web Job is continuously polling the list to locate new requests so It can create the new site. Another approach coul be to create a service (a REST one) that do exactly the same and it's called by a Flow attached to the list...of course, you could call also this same service from a SharePoint workflow. If you ask my recommendation, the first one is much more easy to get it working

Just to confirm and provide some additional resouces. Like @Juan Carlos González Martín mentioned, modern SP sites are different and since they have "noscript" setting enabled, you cannot use sandbox solutions with them. Your can find supported and non-supported features from following MSDN article.


Thank you. I seem to think that my current strategy is no good. The Web Job and PNP CMDLets, would they be a series of actions that would, individually, create the site the way I want it? Is there any other way to do this in a package, or is that functionality gone?

Indeed you can see the Web Job as a package you upload to Azure Web Sites