SITs (sensitive information type) lookup for SharePoint folder and/or path?

Copper Contributor

If I go into Content Explorer:


... I can eventually "drill-down" to a specific folder/file & see if there's "a" given SIT (Sensitive Information Type) in that file / folder & the count.


Is there a way (in PowerShell, C#, GraphAPI) to query a SharePoint "Online/O365" path (either folder or file) && get all the SITs that folder / file contains?

I can't imagine there isn't; but my GoogleFu/BingFu isn't strong enough :(

2 Replies

Hi @GeorgeADP 


I cannot say whether or not this is achievable through programmatic methods but if you have a list of sensitive info types that you want to detect, you could build an eDiscovery case that looks for specific sensitive types and add as many as you want. Since there are over 300 out of the box SITs you may not want to look for all of them and if you have a set list, this could help you. However, it is only able to target an entire site versus a specific folder or file. Once done, within the review sets you could review each matching file and you will see the full contents of that file.


Additionally, you could leverage Microsoft Defender for Cloud Apps to deploy a file policy that scans specific folders or all folders within sharepoint and onedrive for a list of SITs that you define within the file policy if you wanted to.

hello @GeorgeADP ,such a command is finally out: Export-ContentExplorerData (ExchangePowerShell) | Microsoft Learn


not the best yet, i am personally fighting with discrepancies between the overall content explorer data, the drilled down ones and the exported ones, all different numbers...


did u have any luck with the methods @miller34mike suggested?