I have a SharePoint Online site that has custom scripts enabled, and I want to programmatically save it as a template. I do not want to use PnP Provisioning Templates, I want to access the same functionality as savetmpl.aspx
but programmatically. I know that in SharePoint Server you can use the SPWeb.SaveAsTemplate
method in PowerShell or C#, but this is not present in SharePoint Online. Is there a way to do this?
I also found the following url: https://mytenant-admin.sharepoint.com/_vti_bin/sites.asmx. I see ExportWeb
listed there. Would this work in SharePoint Online?
I looked at this question, but I do not want to use PnP Provisioning
DenyAddAndCustomizePages
to 0 using PowerShell and then saving a site as template will be enabled.