通过Graph API检索SharePoint网站作者和权限 [英] Retrieving SharePoint site author and permissions through Graph API

查看:58
本文介绍了通过Graph API检索SharePoint网站作者和权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检索Sharepoint子网站的作者&权限(公共或私有,如果是私有,则为允许的组/成员),最好使用Graph API.

I would like to retrieve Sharepoint subsites authors & permissions (public or private, and if private : allowed groups/members), preferably using Graph API.

对于 Outlook Groups Teams 网站,我可以使用端点/groups/<groupID>/groups/<groupID>/owners/groups/<groupID>/members来实现这一点,但是似乎没有等价于通过以下过程创建的网站:

For Outlook Groups and Teams sites, I can use endpoints /groups/<groupID>, /groups/<groupID>/owners and /groups/<groupID>/members to achieve that, but it seems that there is no equivalent for sites created through the following process:

我发现的唯一有趣"的Graph API端点是/sites/root/sites/<siteID>/lists,返回一些站点元数据(诸如母版页",设计"等数据的集合)以及createdBy结构(包含每个集合的user.id属性.

The only "interesting" Graph API endpoint I found yet, is /sites/root/sites/<siteID>/lists, returning some site metadata (collections of data like "master pages", "designs"...), along with a createdBy structure (containing a user.id property) for each of those collections.

但是,使用它看起来很黑,因此最好使用直接"属性/结构authorowners.此外,/sites/.../lists终结点仅在API的 beta 版本中可用(有人提供有关其发布日期的信息吗?),不过,这并不能告诉我哪些用户可以查看网站.

However, using it would look hacky, a "direct" property/structure author or owners would be preferable. Moreover, the /sites/.../lists endpoint is only available in beta version of the API (has somebody any info on its release date ?), and still, that does not tells me which users are allowed to view the site.

尝试使用其他API,例如 没有提供我需要的任何更详细的信息.

Attempts with other APIs like this one did not provide any closer info to what I need.

感谢您的任何建议.

推荐答案

SharePoint具有网站集>网站>列表>文件夹>项目.默认情况下,每个对象都从其父对象继承权限,但是您可以在任何级别中断继承.因此,为了获得子站点具有的权限的完整图片,您需要枚举该子站点内的每个对象(列表,文件夹,项目),并检查其是否从其父项继承权限.据我所知,Microsoft Graph没有公开允许您执行此操作的API,但是您可以使用SharePoint CSOM(客户端对象模型)或SharePoint REST API.

SharePoint has site collections > sites > lists > folders > items. By default each object inherits permissions from its parent, but you can break inheritance at any level. So in order to get a complete picture of the permissions a subsite has, you will need to enumerate every object inside that subsite (lists, folder, items) and check if it inherits permissions from its parent or not. As far as I know Microsoft Graph doesn't expose an API that lets you do this, but you can instead use SharePoint CSOM (client side object model) or SharePoint REST APIs.

这篇关于通过Graph API检索SharePoint网站作者和权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆