我使用 MS Graph API 检查 Sharepoint 站点、驱动器和项目的权限。我设法恢复除权限级别名称之外的所有信息。 我有一个响应格式(https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0):
{
"id": "string (identifier)",
"grantedTo": {"@odata.type": "microsoft.graph.identitySet"},
"grantedToIdentities": [{"@odata.type": "microsoft.graph.identitySet"}],
"grantedToV2": {"@odata.type": "microsoft.graph.sharePointIdentitySet"},
"grantedToIdentitiesV2": [{"@odata.type": "microsoft.graph.sharePointIdentitySet"}],
"inheritedFrom": {"@odata.type": "microsoft.graph.itemReference"},
"invitation": {"@odata.type": "microsoft.graph.sharingInvitation"},
"link": {"@odata.type": "microsoft.graph.sharingLink"},
"roles": ["string"],
"shareId": "string",
"expirationDateTime": "string (timestamp)",
"hasPassword": "boolean"
}
角色值为
如何重试权限级别 (https://learn.microsoft.com/en-US/sharepoint/understanding-permission-levels)?
我的请求格式:GET /drive/items/{item-id}/permissions
有人可以帮我解决吗?
根据我的研究,目前网站上还没有这样的通过图表获取用户权限的功能。我们只能使用 /sites/{sitesId}/permissions 但该资源仅返回授予 Azure 应用程序的权限。该 API 不会返回站点中的用户。这是和你类似的问题