get audit log value CSOM

fredy setiawan 1 Reputation point
2020-09-15T10:45:00.047+00:00

I have problem how to create API get Audit log and get return value via CSOM?

when i try to this
https://sharepoint.stackexchange.com/questions/248948/site-collection-audit-settings-for-sp-online-using-csom

this is i can't get value it's only save to path.

how to get the value of audit log

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,354 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,617 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,952 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Baker Kong-MSFT 3,801 Reputation points
    2020-09-16T02:12:42.207+00:00

    Hi @fredy setiawan ,

    You can only configure Audit log using CSOM, but you can't querying audit log using CSOM as audit API is not available via the Client Object Model. And this UserVoice has been rejected.

    If you're using SP onpremise, you can have a try below alternative solutions:

    Create classic web service or REST service using SSOM and host it into the server, so you can access Audit long in client-side:

    Other useful link:

    Best Regards,
    Baker Kong


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    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.

    1 person found this answer helpful.

  2. Trevor Seward 11,706 Reputation points
    2020-09-15T16:27:18.007+00:00

    SharePoint Online no longer uses Site Collection Auditing and no longer records entries.

    You should be using the Unified Audit Log, instead.


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.