Reputation: 35925
I am looking for an API that would allow me to do the following: given a business subscription for Office365 and Admin level access, I would like to receive events about file and folder changes.
Example events I am interested it:
Billy uploaded a cat1.jpg to /drives/123/cats on %datetime%
Sally created a file.txt in /drives/123/work_in_progress on %datetime%
Jay shared a data.csv in /drives/123/data with [email protected] on %datetime%
I've looked at activities API and webhooks subscription but not sure if these are the right ones for the purpuses.
Can someone please suggest APIs I can use to get such audit trail data from Office365/OneDrive?
Upvotes: 0
Views: 80
Reputation: 33114
Depending on the scale, Webhooks and Deltas are excellent candidates for this.
Where you'll likely run into challenges is if you're attempting to centrally audit across an entire organization. These endpoints are scoped to a single user/directory/drive/etc. so they are less than ideal for organization-wide auditing.
For broader/top-level auditing, I would instead look at the Office 365 Management Activity API. This API includes the ability to audit SharePoint File Operations.
Upvotes: 1