posts
Converting SharePoint Sharing Links to Canonical URLs with PowerShell
Introduction During a recent community discussion, Suhail Sayed presented an interesting challenge that many organizations face during SharePoint tenant migrations. The problem? Converting sharing links to their canonical URLs when documents are migrated between tenants.
The Challenge When migrating SharePoint documents from one tenant to another, organizations often encounter a specific issue with document references:
The Problem Scenario: Source tenant: Documents contain reference links to other documents Migration requirement: Update these links to reflect the new tenant Complication: Links were created using the Share option, not the Copy Link option Why This Matters: When you generate a link using SharePoint’s Share function, it creates a unique link with a randomly generated ID that redirects to the correct canonical URL.
posts
Exporting and Migrating SharePoint Libraries with Folders Using PnP PowerShell
Introduction Recently, I was asked how to export the first-level folders in document libraries using PnP PowerShell site provisioning cmdlets. While Get-PnPSiteTemplate allows exporting SharePoint site configurations, it doesn’t directly cater to folders. After experimenting with various options, including Add-PnPDataRowsToSiteTemplate, I discovered the solution: the Add-PnPListFoldersToSiteTemplate cmdlet.
The Challenge The initial attempt involved using the Add-PnPDataRowsToSiteTemplate cmdlet with a CAML query to filter folders and it did not work.
Add-PnPDataRowsToSiteTemplate -Path Site.
posts
Dynamically Querying SharePoint Paths with Copilot Studio Agents
Introduction During a discussion in a WhatsApp community group, a question arose about configuring a Copilot Studio agent for HR-related queries. The scenario involved country-specific policies stored in separate SharePoint folders. The challenge was ensuring that the agent dynamically retrieves content relevant to the user’s location. For example, if someone from the UK asks about maternity leave, the agent should only pull information from the UK folder, not from other countries.