Forum Discussion
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
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/
4 Replies
- Britto24Copper Contributor
Hey , You can achieve this via DSPM , DSPM -> Discover -> Data risk assessment. Create an assessment and run for SPO/OD location. The report will give you the count of files also the details on unlabelled files
- ravibharathanCopper Contributor
Since we had the global Microsoft outage recently, one of the issues was that users weren't being prompted to classify their documents via the web applications. I ran the DSPM --> Data Risk Assessment against one site as a test. It took 2-3 days to complete & only gave me a summary which didn't have details of unlabelled files.
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/
- chrishorsted720Tin Contributor
Thanks for this much appreciated