I am able to create audit log report using UI of Sharepoint but everytime I have to run a custom report. I have to generate this log automatically using Programming. I have gone through internet and found that SPAuditQuery Can be use to obtain Audit Logs But How? Or how can i use office 365 management api to generate "Edit User & Permission". In Which type of application we can use it? by the way I am using SharePoint Hosted addin.
1 Answer
There is no CSOM/JSOM to generate SharePoint site collection audit logs; the class you referenced is for SharePoint on-prem only.
In general, you shouldn't be using site collection audit logging in SharePoint Online, rather use the Office 365 Security and Compliance center audit logs. Take a look into the Office 365 Management Activity API reference for a potential API that may fit your requirements.
-
In documentation which you have provided, What will be the "REDIRECT URI", btw i have developed Sharepoint Hosted add-in Commented Jan 1, 2019 at 7:21
-
I have to Consume Office 365 Management Activity Api from SharePoint hosted add-in Commented Jan 1, 2019 at 7:23