question

fredysetiawan-9253 avatar image
0 Votes"
fredysetiawan-9253 asked BakerKong-MSFT commented

get audit log value CSOM

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

office-sharepoint-server-administrationoffice-sharepoint-server-developmentoffice-sharepoint-server-customization
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

trevorseward avatar image
0 Votes"
trevorseward answered fredysetiawan-9253 commented

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

You should be using the Unified Audit Log, instead.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

im using sharepoint on premises @trevorseward . any idea how to get that log in my custom API?

0 Votes 0 ·
BakerKong-MSFT avatar image
1 Vote"
BakerKong-MSFT answered BakerKong-MSFT commented

Hi @fredysetiawan-9253,

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.

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

hi im using SP on premise and how to use SSOM on my project?

0 Votes 0 ·

Hi @fredysetiawan-9253,

How's going today?

Do you have further concerns regarding this issue? Are there any other questions that we can help further? Please feel free to talk with us if you have other questions.

Thanks
Baker Kong

0 Votes 0 ·
Show more comments

or any idea @BrubakerDougS-1660 to get that log in my custom API

0 Votes 0 ·