Share via

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

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint Server | Development
0 comments No comments

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.

    Was this answer helpful?

    1 person found this answer helpful.

  2. trevorseward 11,711 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.

    Was this answer helpful?


Your answer

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