Forum Discussion
chrishorsted720
Jun 24, 2026Tin 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...
- Jun 25, 2026
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/
Britto24
Jul 07, 2026Copper 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
ravibharathan
Nov 25, 2026Copper 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.