SharePoint Document Issues

List Files Affected by SharePoint Online Retention Policies

Huda QurayshiHuda Qurayshi Nov 18, 2026 868 views

Question details

The user needs a report identifying files affected by SharePoint Online retention policies, including file names, paths, and owners.

List Files Affected by SharePoint Online Retention Policies
Product
SharePoint Online and Microsoft Purview
Device & OS
not provided
Scenario
The user is investigating retention policy coverage and wants to turn script output into a readable file report.
Observed behavior
The current PowerShell script returns identifiers but does not provide the desired file properties.
Before you start

Gather the retention policy name, included SharePoint sites, retention settings, and the PowerShell script and sample output. Confirm that you have permission to inspect the policy and relevant SharePoint libraries, and remove sensitive information before sharing examples publicly.

Solution 1Recommended

Ask Microsoft Q&A for Help Resolving File Identifiers

Use Microsoft Q&A when a custom PowerShell report needs to map identifiers to SharePoint file properties.

1
Prepare the policy details

In the Microsoft Purview portal, open Data lifecycle management and review the relevant Microsoft 365 retention policy. Note its SharePoint locations, retention period, and configured actions.

2
Identify the script output

Review the PowerShell script and label each identifier in a sample output, such as a site, list, or item identifier. Include the command that generated it so specialists can determine how to resolve it.

3
Post your question

Go to Microsoft Q&A and select Ask a question. Describe the policy scope, paste a sanitized script and sample output, and request file names, paths, and the specific owner or author property you need.

4
Test the guidance

Run the suggested commands against a limited SharePoint site or library first, then compare the returned file names and paths with the library view.

Ask Microsoft Q&A for Help Resolving File Identifiers
Define the requested owner field: A file's creator, last modifier, and site owner are different properties. Specify which one the report should include.
Free Microsoft Office alternative

Review Document Reports with WPS Office

WPS Office is a free, lightweight alternative for working with documents and spreadsheet reports. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files into your workflow. It does not manage SharePoint retention policies or resolve their identifiers.

Review a file inventory or retention report in WPS SpreadsheetOpen and edit Microsoft Excel XLSX files and other Office formatsUse a familiar interface to work with existing documentsGet free, lightweight tools for everyday office work
microsoft office alternative - wps office

Frequently Asked Questions

Can I get a list of affected files directly from the retention policy settings?

The policy settings in Microsoft Purview show information such as locations and retention actions, but they are not a complete per-file report. A detailed inventory may require additional SharePoint queries and custom reporting.

Why does my PowerShell script return GUIDs instead of file names?

The commands may be returning identifiers for sites, lists, items, or other objects rather than file metadata. Share the specific commands and a sanitized sample of the output on Microsoft Q&A so the identifiers can be mapped to the appropriate SharePoint objects.

Does a retention policy mean every file in a site has been deleted?

No. A policy's scope and configured actions do not establish that an action has occurred on every file. Check the retention period and actions in Microsoft Purview, then investigate individual items as needed.

What is the difference between Microsoft Community and Microsoft Q&A for this issue?

Microsoft Community is suited to general product questions, while Microsoft Q&A is a better place to request help with PowerShell, SharePoint programming, and custom reporting. Include the script, policy settings, and desired report fields in your post.