What to do when a malicious file is found in OneDrive

You've come across a file in OneDrive, but you're unable to open or share it. You can see the file is there, but it's blocked and the file has a warning icon next to it:

Screenshot of files in OneDrive for Business with one detected as malicious

Delete the file (recommended)

To protect yourself and your computer, the best option is to delete the file. From the OneDrive mobile app, your only option is to delete the file.

  1. Select the file you want to delete (on the mobile app, press and hold to select it).

  2. Select Delete.

    Screenshot of deleting a blocked file from OneDrive for Business from the OneDrive mobile app

    Deleting in OneDrive mobile app

Why is a file in OneDrive blocked?

The file is blocked to help protect you and your computer from malware.

Certain safety features are in place in Office 365 such that a malicious file can be identified in OneDrive. If a file in OneDrive is deemed malicious, that file is blocked so that no one can open or download the file. A blocked file has a marker after its file name, like this:

Screenshot of a file in OneDrive for Business detected as malicious

Although it can be inconvenient for a file to be blocked, getting infected with malware is even worse. Cybercriminals use ransomware, technical support scams, or unwanted software to compromise users and computers. Once cybercriminals get access to user credentials or sensitive information, they can use that information to gain access to more information or other users, or even charge fraudulent fees. To learn more, see Understand the different malware types.

What can I do to avoid running into malicious files in the future?

Although cybercriminals continue to find new ways to trick people with malware, there are steps you can take to help protect you and your computer.

To learn more about how malware works and how to prevent malware infection, see Help prevent malware infection on your PC.

Learn more

Protect your account and devices from hackers and malware

Need more help?


Get online help
See more support pages for OneDrive and OneDrive for Business.
For the OneDrive mobile app, see Troubleshoot OneDrive mobile app problems.

Email Support icon

Email support
If you still need help, shake your mobile device while you're in the OneDrive app or email the OneDrive support team. To contact OneDrive for Business support from your PC or Mac, select the OneDrive icon in the notification area or menu bar, then select More > Send feedback > I don't like something.

OneDrive for Business Admins can also view the OneDrive for Business Tech Community, Help for OneDrive for Business Admins, or contact Office 365 for business support.

Office 365 community forums

Got feedback?
OneDrive UserVoice is your place to suggest the features you’d like to see us add to OneDrive. While we can’t guarantee any specific features or timelines, we will respond to every suggestion that gets at least 500 votes.

Go to the OneDrive UserVoice.

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.