SharePoint Document Issues

How SharePoint Online Handles Malware-Infected Files

Steven ParkerSteven Parker Nov 18, 2026 869 views

Question details

Understand how SharePoint Online identifies infected files and handles attempts to download them.

How SharePoint Online Handles Malware-Infected Files
Product
SharePoint Online
Device & OS
not provided
Scenario
A user or administrator wants to know what happens when malware is detected in a SharePoint document library.
Observed behavior
Detected files can be flagged in the library, and users may receive a warning when attempting to download them. Administrators can block infected file downloads.
Before you start

Identify the affected file and document library, and check whether SharePoint has displayed a malware warning. Administrative changes require appropriate SharePoint administrator permissions and the SharePoint Online Management Shell.

Solution 1Recommended

Recognize and report a file flagged as infected

Use this approach when SharePoint displays a malware warning for a library file.

SharePoint Online scans files for known malware, but scanning is not instantaneous and does not guarantee detection of every threat. A flagged file may remain visible in the library; do not assume it has been moved to a separate location.

1
Check the file warning

Open the SharePoint document library and look for a warning or alert icon next to the affected file.

2
Avoid downloading the file

If a warning appears when you select or attempt to download the file, cancel the download and do not open the file.

3
Contact an administrator

Send your Microsoft 365 or SharePoint administrator the file name, library location, and warning details so they can investigate and decide how to remove or remediate it.

Free Microsoft Office alternative

Work with cleared Office documents in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for moving your document work from Microsoft Office. It does not manage SharePoint malware detection or download restrictions; use it only with files your administrator has cleared.

Open and edit documents after they have been cleared by your administratorCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar editing tools make migration from Microsoft Office easierFree, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Does SharePoint Online scan every uploaded file immediately?

No. Malware scanning is not necessarily immediate, and detection is not guaranteed for every threat. Continue to use endpoint protection and follow your organization's security policies.

Can users download a file that SharePoint flags as infected?

It depends on the tenant setting. A SharePoint administrator can check DisallowInfectedFileDownload with Get-SPOTenant and set it to true to block downloads of detected infected files.

Is a detected file automatically moved out of the document library?

Do not assume it has been moved. A flagged file can remain visible in the library with an alert or warning; ask an administrator to investigate it.

What should I do if I see a malware warning on a SharePoint file?

Cancel any download attempt and report the file name, library location, and warning to your SharePoint or Microsoft 365 administrator.