How to Move SharePoint Files and Folders Without Breaking Links

How to Move SharePoint Files and Folders Without Breaking Links

Moving files and folders in Microsoft SharePoint or Teams is a routine task, but it often leads to a major headache: broken document links, broken Excel cross-references, and frustrating 404 errors for your team.

Whether you are reorganizing a department document library or moving channels in Microsoft Teams, preserving link integrity is essential for seamless collaboration. In this comprehensive guide, we will explore why SharePoint links break, how to use SharePoint’s built-in Durable Links (Document ID Service), and best practices to ensure your team never encounters broken references again.


⚡ Link Integrity Lifecycle in SharePoint Online

❌ Standard Direct URL
Hardcodes site path (`/sites/HR/Docs/File.docx`). Breaks instantly if the folder or site structure changes.
⚠️ Sharing Links
Redirects based on GUID permissions. Works across folder moves, but can expire or break if permissions are reset.
✅ Document ID Service
Assigns a static, permanent ID (`DocID=DOC-12345`). Resolves location dynamically even after site-wide migration.

Why Do SharePoint Links Break?

When you copy a URL straight from your browser’s address bar (e.g., https://tenant.sharepoint.com/sites/Marketing/Shared%20Documents/2026/Campaign.pdf), you are using a path-based static URL. If anyone renames the folder 2026 to 2026-Archive or moves Campaign.pdf to another folder, that static URL immediately breaks.

Common scenarios where links fail include:

  • Moving documents between Microsoft Teams channels (which under the hood changes the underlying SharePoint folder path).
  • Renaming parent folders or document libraries during site reorganization.
  • Cross-linking Excel workbooks stored in different SharePoint libraries.

Solution 1: Use the “Copy Link” Feature Instead of Browser URLs

Instead of grabbing the web browser URL, always click the Copy link button next to the document in SharePoint or Teams. SharePoint sharing links include a unique item GUID. When you move a file within the same document library or site using the native “Move to” command, SharePoint automatically updates its internal path pointer, keeping the shared link functional.

Solution 2: Enable Document ID Service (Durable Links)

For organizations managing high volumes of critical documents, the Document ID Service is the ultimate solution. This built-in SharePoint feature automatically assigns a permanent, immutable ID to every file uploaded to your site collection.

When Document IDs are active, your links will look like this:

https://tenant.sharepoint.com/sites/Marketing/_layouts/15/DocIdRedir.aspx?ID=DOC-94827104-12

Even if the file is moved to a completely different document library or renamed multiple times, SharePoint automatically resolves the Document ID URL to the current location!

How to Enable Document ID Service in SharePoint:

  1. Navigate to your SharePoint Site Collection as a Site Administrator.
  2. Click Gear Icon (Settings) > Site Information > View all site settings.
  3. Under Site Collection Administration, click Site collection features.
  4. Find Document ID Service and click Activate.

Automating Permission Hygiene & Link Checks with SPClean

When moving files across sites or reorganizing legacy document libraries, permission inheritance often breaks, leading to orphaned user permissions or guest access leaks. Maintaining proper governance is just as critical as maintaining link validity.

For automated SharePoint Online permission cleanup, auditing deleted accounts, and maintaining clean access control, check out SPClean—a powerful PowerShell toolkit built specifically for SharePoint Online permission hygiene.

Automating Document ID Assignment via PnP PowerShell

If you need to verify or assign Document IDs programmatically across site collections, you can easily connect using PnP PowerShell:

$ClientId = "Your-client-id" # Your Entra ID App Client ID
$SiteUrl = "https://yourtenant.sharepoint.com/sites/Marketing"

# Connect interactively with modern authentication
Connect-PnPOnline -Url $SiteUrl -Interactive -ClientId $ClientId

# Enable Document ID feature on the site collection
Enable-PnPFeature -Identity "698a9229-c304-49c6-9f34-5c792190be7f" -Scope Site

Write-Host "Document ID Service successfully activated!" -ForegroundColor Green

Summary & Best Practices Checklist

ActionRecommended MethodImpact on Links
Moving FilesUse native “Move to” in SharePoint UIPreserves GUID sharing links
Sharing File LinksUse “Copy link” (Sharing Links)Resilient to path & folder renames
Enterprise ArchivingEnable Document ID ServicePermanent link tracking (`DocID=…`)

By enforcing Document IDs and adopting native “Copy link” practices, your organization can eliminate broken link headaches and maintain smooth collaboration across Microsoft 365.

© 2026 M365 Automation. All rights reserved. Designed for M365 Admins.