【问题标题】:Get SharePoint Groups (not AD groups) using Graph API使用 Graph API 获取 SharePoint 组(不是 AD 组)
【发布时间】:2018-05-25 00:16:19
【问题描述】:

是否有使用 Microsoft Graph 检索 SharePoint 组的方法?

我可以使用 https://graph.microsoft.com/v1.0/groups 获取 Azure 目录组,但我正在寻找的是 SharePoint 组。

我可以使用https://graph.microsoft.com/beta/sites/{id} 获得SiteCollection,但我似乎无法在网站集中获得 SharePoint 组。

【问题讨论】:

    标签: microsoft-graph-api sharepoint-online


    【解决方案1】:

    这在 Microsoft Graph 中并不容易访问。如果您对 SharePoint API 有一定的访问权限,则可以从“用户信息列表”中获取 GUID——此时似乎从 Microsoft Graph 中隐藏。该 SharePoint API 调用将是 GET HTTP https://sometenant.sharepoint.com/_api/web/lists?$select=title,id&$filter=Title%20eq%20%27User%20Information%20List%27

    一旦您拥有该列表的 GUID,您就可以进行 Graph 调用: https://graph.microsoft.com/beta/sites/{site id}/lists/{list ID from the SharePoint API}/items

    这将为您提供完整的成员列表,包括群组。这仍然是一个 hack,因为您必须按 contentType/name eq 'SharePointGroup' 过滤组 - 无论如何,这在 Graph Explorer 中似乎有问题。此时尝试以编程方式访问它会很困难。

    【讨论】:

    • 谢谢!会试试看。
    猜你喜欢
    • 1970-01-01
    • 2011-05-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-18
    • 1970-01-01
    相关资源
    最近更新 更多