How can I create a template from an existing site for SharePoint Online that shows up under the "From Your Organization"?

2025-07-02T15:54:32.3766667+00:00

I want to create a SharePoint Online site template from an existing site that will appear under the "From Your Organization" tab when creating a new site. My goal is to include complex components such as custom content types associated with the Shared Documents library, web parts, and page layouts.

I’ve tried using standard PowerShell commands like Get-SPOSiteScriptFromWeb and PnP PowerShell's Get-PnPSiteScriptFromWeb. However, neither of these methods captures the more advanced configurations—particularly custom content types linked to the document library—in the resulting JSON.

I also explored using the PnP Provisioning Engine, which seems more capable of capturing these elements. However, I currently don’t have access to Power Automate, which is often used to automate the application of templates generated through the PnP Provisioning Engine.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Teddie-D 1,775 Reputation points Microsoft External Staff Moderator
    2025-07-03T03:33:36.13+00:00

    Hi @Woldeselassie, Solomon (NIH/NEI) [C] 

    Thank you for posting your question in the Microsoft Q&A forum. 
    You’ve clearly put a lot of effort into finding a solution, and it’s totally understandable to feel stuck when the built-in tools don’t handle more advanced setups like custom content types in document libraries. 

    Based on my research, you're on the right track with PnP Provisioning Engine.
    I found this helpful article to create Provisioning templates, please take it as a reference Introducing the PnP provisioning engine | Microsoft Learn 
    You can export a template using Get-PnPSiteTemplate and apply it with Invoke-PnPSiteTemplate instead of Get-PnPProvisioningTemplate and Apply-PnPProvisioningTemplate according to this Upgrading from the Legacy version of PnP PowerShell | PnP PowerShell 
    You may also want to take a look at this Invoke-PnPSiteTemplate | PnP PowerShel
    To make your template appear in the From Your Organization, there are some steps you may follow: 

    • If your template is in PnP XML format and you want to extract supported actions into a site script > Convert your PnP template to a site script using Convert-PnPSiteTemplate 

    Note: This conversion only includes actions supported by site scripts. Complex elements like custom content types may not be fully captured

    Note: This method works best when your template can be expressed in JSON. 
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link. 

    I hope this helps.
    If you have any specific questions, please feel free to post back.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.