With SP2010, we had our site provisioning process on the server. Now, with SharePoint Online, we have no servers anymore, we got PnP provisioning, that is great, but now I wonder, can I put the PnP scripts, so they run also in the cloud? I found this guide, but I am a little worried about the costs. The article doesn't mention this, but as far as I know, Azure is not free, and I am not allowed to do changes in the tenant that involve any extra cost. Or, at least, I need to inform my team in advance, before doing such things.
Can somebody please tell me, is it safe to do this (and similar) tutorials, because there's always a warning when I try to use a paid feature? Or will I get a surprise bill eventually?


I do my provisioning for SharePoint online with Azure Functions and for me the cost has been nothing or cents in small environments. It all depends on your usage. You only pay for what you use and you get free usage every month: https://azure.microsoft.com/en-us/pricing/details/functions/

The only downside of an Azure Function is the maximal runtime of 5 minutes by default which you can extend to 10 minutes in the properties. You need to architect your solution to remain well within this limit.

Another option is to use Azure Automation. I haven't used that, but it could work.

  • Thank you. 5 minutes per call or per batch? Like I would like to call 10 times the create site function and then 10 times the apply template function. Shall this 20 actions in total fit into the 5 (10) minutes or 1 of these? – vilmarci Jul 31 '18 at 10:02
  • 5 (or 10) minutes before your process is killed. So if applying a template takes 15 minutes, you need to split it up in two functions, and make sure to call the second after the first has finished. To orchestrate this, you could use flow or Logic Apps. – Oak3 Aug 1 '18 at 7:50

You can still use your on-premises servers to do remote provisioning to SharePoint Online. They just need connectivity to the Internet. Azure's just a place to host your code. If it doesn't make sense for your needs then you don't have to use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.