如何从Office365 Graph API获取Purview GUID?

问题描述 投票:0回答:1

我正在使用 Microsoft Graph API 处理来自 Office365(OneDrive、Sharepoint、Exchange Online)的大量文件和电子邮件。

效果很好,通过 https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0&tabs=http =

https://graph.microsoft.com/v1.0/drives/{drive_id}/items/{dir_id}/children
获取 OneDrive 记录。没问题。

但现在我需要使用 Purview API 为其中一些项目分配 Purview 标签: https://learn.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/add-label?tabs=HTTP

所有 Purview API 文档都讨论“

guid
– 实体的全局唯一标识符”作为输入,以指定我要将标签分配给哪个文档。我如何获得该指南?

我在 OneDrive 响应中没有看到任何“guid”属性。老实说,我完全迷失在 Microsoft API 的无限间接和 ID 中。

Graph API 响应如何与 Purview GUID 相关?

azure microsoft-graph-api onedrive azure-purview
1个回答
0
投票

不确定是否相同,但 Graph API beta 允许您在 driveItem

设置保留

标签
PATCH beta/drives/{drive-id}/items/{id}/retentionLabel

可能,您不需要调用 Purview API。

资源:

应用保留政策

© www.soinside.com 2019 - 2024. All rights reserved.