SOLVED

SPO Publishing Site Determine Forward and Backward Links for a Resource

Brass Contributor

Our intranet is built on classic SPO publishing sites.  Content owners need help finding references to resources to manage expired content by cleaning up hyperlinks to expired content on pages.  I learned that they are using _layouts/15/sitemanager to select a resource then identify links to that resource.  For example, select a file in a document library and determine which pages reference that document.

 

This is a tedious activity to determine links file-by-file, page-by-page, and requires site collection admin privilege to use site manager.  There must be a better way so I searched for a solution in PnP and elsewhere.  All I found was a dated Blog that used PowerShell to get the list items then use file.BackwardLinks and file.ForwardLinks.

  • Is this property available in SPO PowerShell?  Could not find any references.

 

Is it possible to build a PnP or SPO PowerShell solution that a site owner could use to gather all files in a given library, or even site, and generate a report showing all references within that site collection to each file?

3 Replies
best response confirmed by Steven Sanders (Brass Contributor)
Solution

Looks like you might be out of luck.

 

Server side object model gives you the property, Which you wont be able to use with SharePoint online.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.spfile.backwardlinks?view=sharepoin...

 

CSOM, which you can use with SharePoint online does not have that property.

 

 

Thank you for confirming what I expected.
No problem, please mark as solution 🙂
1 best response

Accepted Solutions
best response confirmed by Steven Sanders (Brass Contributor)
Solution

Looks like you might be out of luck.

 

Server side object model gives you the property, Which you wont be able to use with SharePoint online.

https://docs.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.spfile.backwardlinks?view=sharepoin...

 

CSOM, which you can use with SharePoint online does not have that property.

 

 

View solution in original post