Respond to SharePoint Audit events through custom code RRS feed

  • Question

  • I would like to write a custom application to respond to SharePoint Audit events, and retrieve the Audit data instantly from the content database. This information will be used to create custom audit logs which would be more descriptive. 

    Does SharePoint offers any API to track audit events?

    Wednesday, June 15, 2016 7:06 AM


  • Hi,

    You can use the Server Object Model to interact with Audit programmatically:

    1. SPAudit

    2. SPAuditEntry

    3. SPAuditEventType

    4. SPAuditQuery

    An article with detailed code about these classes for your reference:



    Dean Wang

    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Proposed as answer by Victoria Xia Saturday, June 25, 2016 5:09 AM
    • Marked as answer by Victoria Xia Monday, July 4, 2016 11:37 AM
    Thursday, June 16, 2016 9:16 AM

All replies