Home » Blog » SharePoint Online » How to Audit SharePoint Site and View Log Reports? Step By Step Guide

How to Audit SharePoint Site and View Log Reports? Step By Step Guide

author
Published By Raj Kumar
Anuraag Singh
Approved By Anuraag Singh
Published On August 13th, 2024
Reading Time 4 Minutes Reading

Auditing the SharePoint sites is essential for maintaining security, compliance, and maximizing performance. We are aware of the importance of SharePoint in collaboration, site management, and other benefits as well. So, it is also necessary to ensure the SharePoint site security and efficiency, through a audit. So, in this article, we will walk you through the steps of how to audit SharePoint site.

Activities that are Audited in SharePoint Online

SharePoint Online is used by almost every employee of the organization. This is also one of the reasons for auditing. For instance, if some of the documents are renamed, misplaced, or edited appropriately. Then as a SharePoint admin, you can track the user who did this. So, let’s take a look at some activities that are tracked by the administrator.

  • Documents file activities
  • Sharing and access request activities
  • Site administration activities
  • Directory administration activities
  • Power BI operations activities
  • Microsoft Teams Healthcare activities
  • Power Automate activities
  • Synchronization activities
  • SharePoint list activities
  • Site permissions activities
  • Manage SharePoint User Profiles activities

How to Configure the Auditing in SharePoint Site Collection?

Follow the below steps to configure the Auditing in SharePoint to audit SharePoint site.

  • Step 1. Login with the admin credentials in the Microsoft 365 Admin Center.
  • Step 2. Click on Show All and then hit the Compliance option
  • Step 3. Now, choose the Audit option from the left navigation pane.
  • Step 4. Hit the link “Start Recording User and Admin Activity” to audit SharePoint site. If the link is not available means the auditing is already setup in SharePoint Online.

How to Enable Audit Log in SharePoint Online using PowerShell?

#Set up the connection to Exchange Online
Connect-ExchangeOnline -Credential (Get-Credential) -ShowBanner:$False

#Let’s enable the Audit Log
If( (Get-AdminAuditLogConfig).UnifiedAuditLogIngestionEnabled)
{
Write-host “Auditing is Enabled!” -f Yellow
}
Else
{
#apply the audit settings
Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $True
Write-host “Auditing is Enabled Successfully!” -f Green
}

Disconnect-ExchangeOnline

How to View SharePoint Online Audit Logs Using Admin Center?

After the enabling of the Auditing in SharePoint, you need to wait for 30 mins to 24 hours to collect the reports. Below are the steps to to check SharePoint audit logs.

Step 1. Log in to the Office 365 Compliance and Security.
Step 2. Click on the Search option and then Audit Log Search.
Step 3. From the Search panel, you can filter out the report on the basis of

  • Activities: Take out the report on the basis of activities.
  • Start Date and End Date: Enter the specified time as per the requirement.
  • Users: Filter out the report of the particular user.
  • File, Folder, or Site: You can also provide the file, folder, or site URL.

Step 4. After specifying the parameter, hit on the Search option.
Step 5. Now you can filter the data among lists, libraries, Power BI, etc. You can also export the report in a CSV file and find out what activities were performed with the data and by whom.

How to Check Audit Logs in SharePoint Online Using PowerShell?

Below are the PowerShell commands that you can use to filter the SharePoint log reports easily.

Connect-ExchangeOnline -ShowBanner:$False

#Apply Date filter
$BegDate = (Get-Date).AddDays(-1)
$LastDate = Get-Date

$SharePointLogReport = Search-UnifiedAuditLog -BegDate $BegDate -LastDate $LastDate -RecordType SharePointFileOperation
$AuditLogFinalResults = $SharePointLogReport.AuditData | ConvertFrom-Json | Select CreationTime,UserId,Operation, SiteUrl,SourceFileName,ClientIP

#Save the SharePoint Online Audit log to a CSV file
$AuditLogFinalResults
$AuditLogFinalResults | Export-csv -Path “C:\Temp\AuditLog.csv” -NoTypeInformation

Disconnect-ExchangeOnline

What to do If the Log Report Shows Some Inappropriate Changes in Documents?

Have you ever thought, what if the SharePoint reports are found to be modified inappropriately? There might be an employee who did this by mistake and now you are unable to restore the actual data. At that time, you can go with the Impeccable SharePoint Migration Tool.

Download Now Purchase Now

This is a reliable and efficient tool that is well-versed in SharePoint data migration. One can easily use this tool to copy document library from one site another site without any setbacks. It helps to ensure that your data is safe and secure on another tenant.

Concluded Words

It is required to audit the SharePoint site for tracking user activities, troubleshooting issues, and identifying data breaches. All the essential steps to enable auditing and view log reports in SharePoint Online are outlined in a detailed manner. Additionally, you can also use PowerShell to automate the Auditing in SharePoint Online. So, now your query on how to audit SharePoint site is resolved along with the solution to protect data originality by using the professional tool.

Connect With Us

+9111-28084986