当前位置:网站首页 > 更多 > 玩电脑 > 正文

[玩转系统] SharePoint Online:如何在安全与合规中心查看审核日志报告?

作者:精品下载站 日期:2024-12-14 15:41:10 浏览:15 分类:玩电脑

SharePoint Online:如何在安全与合规中心查看审核日志报告?


要求:在 SharePoint Online 中查看审核日志报告。

如何查看SharePoint Online审核日志?

SharePoint Online 中的审核日志报告提供有关租户中已执行的特定操作的详细信息,例如用户何时创建、更新或删除项目,或者当用户查看文档时。审核日志报告缺少 SharePoint Online?好吧,SharePoint 审核日志功能已移至 Microsoft 365 安全与合规中心统一日志记录!我们无法再修剪或限制 SharePoint Online 中的审核日志事件!如果您转到网站设置页面的网站集管理部分上的“审核日志设置”,您将看到以下内容:

[玩转系统] SharePoint Online:如何在安全与合规中心查看审核日志报告?

因此,要查看审核日志,您应该使用 Office 365 安全与合规中心网站!在本教程中,我们将向您展示如何在 Office 365 安全与合规中心查看 SharePoint Online 的审核日志。这将包括将结果范围缩小到特定日期范围、用户或操作的步骤,以及根据需要将结果导出到 CSV 文件的步骤。

在 Office 365 中启用审核设置

如何在 SharePoint Online 中启用审核日志报告?在您访问 SharePoint Online 的审核日志之前,我们必须在合规中心中打开审核日志功能。

  1. 使用全局管理员权限登录 Microsoft Office 365 管理中心:https://admin.microsoft.com
  2. 单击“显示全部”链接,然后单击左侧导航栏中管理中心下的“合规性”。
  3. 在合规中心,点击左侧导航栏中的“审核”链接 >> 点击“开始记录用户和管理员活动”按钮,并在一分钟内完成。如果您没有看到此链接或按钮,则意味着审核已开启。

    [玩转系统] SharePoint Online:如何在安全与合规中心查看审核日志报告?

您还可以使用 PowerShell 启用 SharePoint Online - Office 365 的审核日志:


#Connect to Exchange Online
Connect-ExchangeOnline -Credential (Get-Credential) -ShowBanner:$False

#Enable Audit Log 
If( (Get-AdminAuditLogConfig).UnifiedAuditLogIngestionEnabled)
{
    Write-host "Auditing is already Enabled!" -f Yellow
}
Else
{
    Set-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $True
    Write-host "Enabled the Auditing Successfully!" -f Green
}

#Disconnect Exchange Online
Disconnect-ExchangeOnline

如何查看SharePoint Online审核日志?

启用审核后,需要一些时间(30 分钟到 24 小时!)来收集数据和准备报告。您可以通过以下方式执行 Office 365 安全审核或 SharePoint 审核日志搜索:

  1. 登录安全与合规中心 https://compliance.microsoft.com/auditlogsearch 或 https://protection.office.com
  2. 单击左侧导航栏中的“搜索”>>“审核日志搜索”。
  3. 在搜索面板中,您可以应用搜索条件,例如:

    • 活动:有很多活动可供您选择。
  4. 开始日期和结束日期:指定活动的持续时间
  5. 用户:定义是否需要特定用户的报告
  6. 文件、文件夹或网站:添加全部或部分文件名、文件夹名称或 SharePoint 网站 URL。

    [玩转系统] SharePoint Online:如何在安全与合规中心查看审核日志报告?

  7. 在搜索面板中选择相关活动和其他参数。设置完成后,单击底部的“搜索”按钮开始从 SharePoint Online 搜索审核日志。

    [玩转系统] SharePoint Online:如何在安全与合规中心查看审核日志报告?

从结果面板中,您可以过滤搜索结果,还可以以 CSV 格式导出结果数据。

使用 PowerShell 搜索和导出 Office 365 审核日志

使用PowerShell,您可以查询审核日志并生成报告。例如,您可能希望针对特定事件(例如“外部用户邀请”、“已删除项目”等)定期生成报告。以下是搜索和导出统一审核日志的示例。


#Connect to Exchange Online
Connect-ExchangeOnline -ShowBanner:$False

#Set Dates
$StartDate = (Get-Date).AddDays(-7)
$EndDate = (Get-Date)

#Search Unified Log
$AuditLog = Search-UnifiedAuditLog -StartDate $StartDate -EndDate $EndDate -ResultSize 5000
$AuditLogResults = $AuditLog.AuditData | ConvertFrom-Json | select CreationTime, UserID, Operation, ClientIP, ObjectID
$AuditLogResults
$AuditLogResults | Export-csv -Path $CSVPath -NoTypeInformation

#Disconnect Exchange Online
Disconnect-ExchangeOnline

这将从 Office 365 的所有应用程序获取所有审核日志。有关所有可用参数,请参阅此文档:https://docs.microsoft.com/en-us/microsoft-365/compliance/search-the-audit-log-in -安全性和合规性?view=o365-worldwide

使用 PowerShell 获取 SharePoint Online 审核日志:

让我们过滤文件上的 SharePoint Online 审核日志并使用 PowerShell 生成报告。


#Connect to Exchange Online
Connect-ExchangeOnline -ShowBanner:$False

#Set Date Filters - past 24 hours!
$StartDate = (Get-Date).AddDays(-1)
$EndDate = Get-Date

#Search Unified Log
$SharePointLog = Search-UnifiedAuditLog -StartDate $StartDate -EndDate $EndDate -RecordType SharePointFileOperation
$AuditLogResults = $SharePointLog.AuditData | ConvertFrom-Json | Select CreationTime,UserId,Operation, ObjectID,SiteUrl,SourceFileName,ClientIP

#Export Audit log results to CSV
$AuditLogResults
$AuditLogResults | Export-csv -Path "C:\Temp\AuditLog.csv" -NoTypeInformation

#Disconnect Exchange Online
Disconnect-ExchangeOnline

要过滤特定用户的所有事件,请使用以下脚本:


$AuditLogs = Search-UnifiedAuditLog -StartDate $StartDate -EndDate $EndDate -UserIds "[email protected]"  
$AuditLogResults = $AuditLogs.AuditData | ConvertFrom-Json | Select CreationTime,UserId,Operation,Workload, ObjectID
$AuditLogResults

同样,我们可以过滤特定事件:


#Filter Audit log to Find specific operations
$SiteURLs = @("https://Crescent.sharepoint.com/*")
$CSVFile = "C:\Temp\AuditLog.csv"
$FileAccessOperations = @('PageViewed', 'PageViewedExtended','FileAccessed', 'FileAccessedExtended','FileDeleted')
$FileAccessLog = Search-UnifiedAuditLog -StartDate $StartDate -EndDate $EndDate -Operations $FileAccessOperations -ResultSize 5000 -ObjectIds $SiteURLs
$FileAccessLog.AuditData | ConvertFrom-Json | Select CreationTime,UserId,Operation, ObjectID,SiteUrl,SourceFileName,ClientIP | Export-csv $CSVFile -NoTypeInformation -Force#Filter Audit log to Find specific operations

结论:

总之,在 Office 365 安全与合规中心查看 SharePoint Online 审核日志是监控用户活动、解决问题和识别潜在安全漏洞的有效方法。本教程中概述的步骤向您展示如何在安全与合规中心查看审核日志并将结果范围缩小到特定日期范围、用户或操作。此外,您还可以使用 PowerShell 查看和导出审核日志,如果您需要自动化流程或查看大量数据,这会很有用。访问审核日志并能够定期查看它们是维护 SharePoint Online 环境的安全性和合规性的一个重要方面。

您需要 登录账户 后才能发表评论

取消回复欢迎 发表评论:

关灯