Track open/download event for documents in SharePoint 2016 on-prem

Henrik Ravn 0 Reputation points
2023-05-23T09:37:20.82+00:00

Hi,

When a user is opening or downloading a file in SharePoint 2016 on-prem, is it then possible to track that from Javascript, web part or other techniques?

Without using OOB Audit functionallity.

We want to write data to a database from server side when opening/downloading.

Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,486 Reputation points Microsoft External Staff
    2023-05-24T06:48:09.38+00:00

    Hi @Henrik Ravn,

    To do a specific set of action when something changed on SharePoint components like lists, libraries or even content types, you can create Event Receivers. Event Receiver is a feature in SharePoint to handle events that are triggered when an action happened on SharePoint objects.

    Here is the document for more details

    https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/event-receiver-and-list-event-receiver-sharepoint-add-in


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.