@pnp/sp v. 1.0.4
Is there a way to create a new site collection with pnpjs?
No - the thinking being site collections are typically created by admins or a provisioning process. Then client side code would operate inside that container. Can you expand on your use case and we can consider adding it?
@patrick-rodgers I was just looking into using pnpjs as a full replacement for current C# code to automate a number of SharePoint processes. These are currently in an Azure Function app and provision sites, set security, update site info, and collection site information across a tenant. Most other development is leaning towards JS so it would be nice to standardize on JS tools to handle both client-side and server-side requirements.
Right on, will have a look at what it would take to support. Likely not by the next version, but perhaps the one after (June).
After having a look at this we won't be adding support to create new site collections. This is a tenant admin level activity and is better handled through the PnP provisioning engine. There also isn't a REST api to support this action. Thanks for your interest in the library and please let us know if you have further feedback.
Hi all, I'm assuming as of 1.26 creating site collections using @pnp/sp is now supported? https://pnp.github.io/pnpjs/sp/docs/sites/
Most helpful comment
@patrick-rodgers I was just looking into using pnpjs as a full replacement for current C# code to automate a number of SharePoint processes. These are currently in an Azure Function app and provision sites, set security, update site info, and collection site information across a tenant. Most other development is leaning towards JS so it would be nice to standardize on JS tools to handle both client-side and server-side requirements.