# Manually installing Origami sample pages

**URL:** <https://community.origamiconnect.com/t/manually-installing-origami-sample-pages/1080>\
**Category:** Archive Manuals\
**Created:** [August 25, 2025, 7:53pm UTC](https://community.origamiconnect.com/t/manually-installing-origami-sample-pages/1080 "2025-08-25T19:53:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![origami](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.origamiconnect.com/origami/32/436_2.png) [@origami](https://community.origamiconnect.com/u/origami)\
**Post date:** [August 25, 2025, 7:53pm UTC](https://community.origamiconnect.com/t/manually-installing-origami-sample-pages/1080/1 "2025-08-25T19:53:27Z")

</div>

Here’s a clean, end-to-end way to add Origami sample pages to your **SharePoint Online Communication Site**.  
If your Microsoft SharePoint GCC or GCC High customer, this is how you’d install sample pages.

> **Part 1: Installing PowerShell (one-time)**
>
> 1. **PowerShell**  
> Follow this part only if you do not have PowerShell 7 installed on your computer, otherwise skip this step  
> ![image](https://canada1.discourse-cdn.com/flex031/uploads/origamiconnect/original/2X/3/311ffa7c1c3922fdd3548686532d296c58eb0d1e.jpeg)
> 
> - **Windows 10/11:** open Terminal and run:  
> `winget install --id Microsoft.PowerShell -e`
> - **macOS (Homebrew):**  
> `brew install --cask powershell`
> 
> 1. **Execution policy (Windows only, if needed)**
> 
> ```auto
> # Run in an elevated Windows PowerShell/Terminal once
> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
> 
> ```
> 
> 1. **Install PnP.PowerShell (cross-platform)**
> 
> ```auto
> # In PowerShell 7+
> Install-Module PnP.PowerShell -Scope CurrentUser
> # If prompted to trust PSGallery, choose "Y"
> 
> ```
> 
> 1. **Permissions you’ll need**
> 
> - **Site Collection Admin** on the site where you want to install Origami samples.

> **Part 2: Get ClientID**
>
> ClientID will allow the PowerShell script authenticate to your tenant, here is how to retrieve it.
> 
> 1. Log into Azure: [https://portal.azure.com](https://portal.azure.com)
> 
> 2. Open **Entra ID** :  
> ![image](https://canada1.discourse-cdn.com/flex031/uploads/origamiconnect/original/2X/9/9772766b21079fe682fc68df0e5fa1ece3b62245.png)
> 
> 3. Click on **App registrations** → **All applications** → **PnP**  
> **NOTE:** If you don’t have PnP application, you can create a new PnP registration and give it necessary permission as pointed by red arrows below:  
> 
> 4. Copy ID as shown below:  
> 
> 5. When you click on PnP application, ensure you have given it **AllSites.FullControl** permission as shown below:

> **Part 3: Run PowerShell script to install sample pages**
>
> Replace highlighted variables in the PowerShell script below.  
> Then, copy and paste the script into your PowerShell command window.
> 
> ```auto
> $TargetSiteUrl = "https://tenantname.sharepoint.com/sites/SiteCollectionName" <--change to your site URL
> $TargetSiteServerRelativeUrl = "/sites/SiteCollectionName" <--change to your site relative URL
> $ClientId = "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX" <--change to your ClientID
> 
> $ImportJsonUrl = "https://origamiinstallation.blob.core.windows.net/templates/Homepage-page-definition.json"
> 
> Connect-PnPOnline `
> -Url $TargetSiteUrl `
> -Interactive `
> -ClientId $ClientId
> 
> $pageDefinition = Invoke-RestMethod -Uri $ImportJsonUrl -Method Get
> 
> $pageName = $pageDefinition.PageName
> $pageTitle = $pageDefinition.Title
> 
> # Create asset folder if missing
> Resolve-PnPFolder -SiteRelativePath "SiteAssets/PageAssets" | Out-Null
> 
> # Upload embedded images and replace source URLs
> foreach ($asset in $pageDefinition.Assets) {
> 
> Write-Host "Importing image: $($asset.FileName)" -ForegroundColor Cyan
> 
> $bytes = [Convert]::FromBase64String($asset.Base64)
> $tempAssetPath = Join-Path $env:TEMP $asset.FileName
> 
> [System.IO.File]::WriteAllBytes($tempAssetPath, $bytes)
> 
> Add-PnPFile `
> -Path $tempAssetPath `
> -Folder "SiteAssets/PageAssets" `
> -NewFileName $asset.FileName
> 
> $newUrl = "$TargetSiteServerRelativeUrl/$($asset.TargetPath)"
> 
> if ($pageDefinition.CanvasContent1) {
> $pageDefinition.CanvasContent1 =
> $pageDefinition.CanvasContent1.Replace($asset.OriginalUrl, $newUrl)
> }
> 
> if ($pageDefinition.LayoutWebpartsContent) {
> $pageDefinition.LayoutWebpartsContent =
> $pageDefinition.LayoutWebpartsContent.Replace($asset.OriginalUrl, $newUrl)
> }
> }
> 
> # Create page if missing
> $existingPage = Get-PnPListItem -List "Site Pages" -Query @"
> <View>
> <Query>
> <Where>
> <Eq>
> <FieldRef Name='FileLeafRef' />
> <Value Type='File'>$pageName</Value>
> </Eq>
> </Where>
> </Query>
> </View>
> "@
> 
> if (-not $existingPage) {
> Add-PnPPage -Name $pageName -LayoutType Article
> }
> 
> $pageItem = Get-PnPListItem -List "Site Pages" -Query @"
> <View>
> <ViewFields>
> <FieldRef Name='Title' />
> <FieldRef Name='CanvasContent1' />
> <FieldRef Name='LayoutWebpartsContent' />
> <FieldRef Name='PageLayoutType' />
> <FieldRef Name='FileLeafRef' />
> </ViewFields>
> <Query>
> <Where>
> <Eq>
> <FieldRef Name='FileLeafRef' />
> <Value Type='File'>$pageName</Value>
> </Eq>
> </Where>
> </Query>
> </View>
> "@
> 
> Set-PnPListItem `
> -List "Site Pages" `
> -Identity $pageItem.Id `
> -Values @{
> Title = $pageTitle
> CanvasContent1 = $pageDefinition.CanvasContent1
> LayoutWebpartsContent = $pageDefinition.LayoutWebpartsContent
> PageLayoutType = $pageDefinition.PageLayoutType
> }
> 
> Write-Host "Imported page and assets: $pageName" -ForegroundColor Green
> 
> ```

> **Part 4: Upload additional sample pages**
>
> You’ll notice in Part 3 this line:
> 
> ```auto
> https://origamiinstallation.blob.core.windows.net/templates/Homepage-page-definition.json
> 
> ```
> 
> This installs a sample page for a Homepage.  
> You can install other sample pages by re-running the script in Part 3 with any of these URLs for site definition:
> 
> - Benefits page: [https://origamiinstallation.blob.core.windows.net/templates/Benefits-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/Benefits-page-definition.json)
> - Homepage 1: [https://origamiinstallation.blob.core.windows.net/templates/Homepage1-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/Homepage1-page-definition.json)
> - Homepage 2: [https://origamiinstallation.blob.core.windows.net/templates/Homepage2-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/Homepage2-page-definition.json)
> - Homepage 3: [https://origamiinstallation.blob.core.windows.net/templates/Homepage3-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/Homepage3-page-definition.json)
> - Homepage 4: [https://origamiinstallation.blob.core.windows.net/templates/Homepage4-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/Homepage4-page-definition.json)
> - Homepage 5: [https://origamiinstallation.blob.core.windows.net/templates/Homepage5-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/Homepage5-page-definition.json)
> - Knowledgebase Article: [https://origamiinstallation.blob.core.windows.net/templates/KnowledgebaseArticle-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/KnowledgebaseArticle-page-definition.json)
> - Knowledgebase Category: [https://origamiinstallation.blob.core.windows.net/templates/KnowledgebaseCategory-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/KnowledgebaseCategory-page-definition.json)
> - Knowledgebase Home: [https://origamiinstallation.blob.core.windows.net/templates/LearningHome-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/LearningHome-page-definition.json)
> - Training Home: [https://origamiinstallation.blob.core.windows.net/templates/LearningHub-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/LearningHub-page-definition.json)
> - News Center: [https://origamiinstallation.blob.core.windows.net/templates/NewsCenter-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/NewsCenter-page-definition.json)
> - Onboarding: [https://origamiinstallation.blob.core.windows.net/templates/Onboarding-preview.png](https://origamiinstallation.blob.core.windows.net/templates/Onboarding-preview.png)
> - Payroll & Expenses: [https://origamiinstallation.blob.core.windows.net/templates/PayrollandExpenses-page-definition.json](https://origamiinstallation.blob.core.windows.net/templates/PayrollandExpenses-page-definition.json)

---

<div class="post-metadata">

**Author:** ![origami](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.origamiconnect.com/origami/32/436_2.png) [@origami](https://community.origamiconnect.com/u/origami)\
**Post date:** [August 7, 2026, 1:09am UTC](https://community.origamiconnect.com/t/manually-installing-origami-sample-pages/1080/2 "2026-08-07T01:09:17Z")

</div>

Unlisted on August 7, 2026, 1:09am UTC


