如何以编程方式获取标签 activity 报告(O365 数据治理)用户级别和文件级别?

How to get label activity reports ( O365 Data Governance) user level and file level programatically?

我在数据治理中使用了标签和策略。自动发布标签后,我看到 OneDrive 中的各个文件都被标记了标签。

我需要以编程方式检查是否有任何标签与该文件关联并对其进行分类。我在通过 Graph 查询时也没有看到标签数据。

https://graph.microsoft.com/v1.0/me/drive/root/children/test.txt

我们是否有任何 powershell 命令或 REST API 来获取粒度级别的这些数据?

https://docs.microsoft.com/en-us/office365/securitycompliance/view-label-activity-for-documents?redi...

谢谢, 马丹

你试过这个来检索 LabelActivity 吗:

https://docs.microsoft.com/en-us/powershell/module/exchange/policy-and-compliance-retention/get-compliancetag?view=exchange-ps

关于从 Graph 中检索标签的第一个问题,您可以尝试以下查询来检查它是否提供标签信息。我自己没试过。

获取https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item-id}?expand=fields

您可以使用来自以下查询的 SharePointIds 的信息构造 SharePointId: https://graph.microsoft.com/v1.0/drive/root/children?$select=Name,sharepointIds