Forum Discussion
chrishorsted720
Jun 24, 2026Copper Contributor
Unlabelled Files
I have a requirement to produce a report which contains the number of files in M365 SharePoint & OneDrive which do not have a sensitivity label applied. I am struggling to find a sensible approach to this and I am fairly certain this is not possible in Purview unless I have missed something. If anyone can help it would be appreciated.
Thanks
1 Reply
Well you have to iterate each file and check for the presence of a label, then do the count. Here's a sample script to get you started: https://practical365.com/sharepoint-online-files-report/