Forum Discussion
Invoke-PnPSiteTemplate slower than it used to be
The failure is the Azure Functions Consumption-plan limit: a function can run for at most ten minutes, so a slower template application cannot wait longer on that plan. The fact that every retry now times out means the first pass is not reaching a resumable point; it does not by itself confirm a Microsoft CSOM regression. Capture a run log for each template phase, PnP PowerShell version, correlation IDs, and the first operation whose duration changed. Test the same template against one new site outside the Function and compare it with a minimal template to isolate a handler or tenant-side delay. Make creation idempotent so retries skip verified completed work instead of reapplying it. For the blocked workload, move the long-running orchestration to a plan or asynchronous design that fits the documented execution model, then retain the 10-minute function only to start and monitor the work. Escalate with log evidence.