1

I am looking to build an application that among other things can connect to a customer's O365 account (using their admin credentials), get directory and file and folder info (metadata), classify the files to find sensitive data (like SSN, PII, etc) and remediate problems.

Is there any way - using APIs - to connect to OneDrive, apply a classification profile (for example , give a regular expression that matches SSN) and get a response with the list of files that match that criterion?

Put another way, how can I classify data on OneDrive?

Thanks, - deepak

1 Answers1

1

You can use Microsoft's Graph API to get the list of files. You can see an example of using it in a project I wrote https://github.com/maximrub/SharePointOnlineTasker

You can use the Graph API to get the files info (hashes, names, size and so on..) and you can also use it to download the content. If you can classify by metadata only (file names etc'..) you won't need to download it