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/
3 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
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