Pages Menu

Posted by on Sep 11, 2021 in Development, Microsoft Teams

Microsoft Graph will now tell you if your files contain malware

Microsoft Graph will now tell you if your files contain malware

A new update to Microsoft Graph lets developers know if files they are listing or accessing contain malware. An additional property to the driveItem object will now optionally be included in Graph responses to indicate the presence of known malware. This new property is available today on both /beta and /v1.0 endpoints.

As you can see, details are thin on exactly what sort of malware is scanned for and presented, but the malware description field is a string allowing for a range of different information. This field is optional, meaning that if it is not present it means no malware has been detected. Also, you can’t update this field… 😉

Because the driveItem object is accessible when searching or listing files, developers can check for malware before they access the file, which is good.

As far as I can tell, there isn’t a way to search for all files which contain malware, which might be a useful API call for developers building administration solutions.

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.