Forum Discussion

null null's avatar
null null
Iron Contributor
Dec 13, 2018

Azure function Site Design Site Script CSOM code for Site Creaion

The latest approach to modern team site is using site script and site design.

 

However, we have a requirement where much of the execution happens as part of a web form.

 

I was wondering if we could put the necessary site creation information in a ShaePoint Listand have a flow run and create a site. Please correct me if wrong, i think the site script site design strategy will call the flow not the other way round. Is there a way to call Site design from a csom code. If not , i think i have to use Azure function with Powershell to create the site. Does all the PowerShell commands supported in Azure function (e.g.,s applying a theme etc)

  • Site Sritps and Site Designs are a mechanism to extend new sites or existing ones, but not to create a new site....if you need to automate site creation, you can follow approaches such as:
    1) Use directly flow (using the SharePoint Send HTTP Request action) you can create sites and then apply a site script to then
    2) You can create a site by means of an Azure Function tha can be coded in PowerShell o C#. In both cases you are using SPO APIs + SPO cmdlets (only for the PS approach). This Azure Function could be called from a Flow
    • null null's avatar
      null null
      Iron Contributor

      is there an example to Send HTTP Request action to apply  site script .

       

      does the Azure function supports all the cmd lets including the Applying the a site.