【问题标题】:How to list all personal sharepoint sites using microsoft graph?如何使用 microsoft graph 列出所有个人共享点站点?
【发布时间】:2023-03-22 17:30:01
【问题描述】:

我想使用 Microsoft graph API 获取以下数据

  1. 所有根站点(组+个人)
  2. 所有组根站点
  3. 所有个人根站点

对于第一种情况,我目前使用https://graph.microsoft.com/v1.0/sites 来找出所有根站点

对于第二个,我使用https://graph.microsoft.com/v1.0/sites?search=contentclass:STS_Site 查找所有组站点。

我不确定如何使用哪个 API 来仅查找个人网站。图形 API 是否有任何过滤器可以做到这一点?还有没有办法更好地解决第 1 点和第 2 点?

【问题讨论】:

    标签: sharepoint microsoft-graph-api sharepoint-online microsoft-graph-files


    【解决方案1】:

    @Mridul Sharma,

    请参考以下步骤:

    1. 管理站点中有一个名为“DO_NOT_DELETE_SPLIST_TENANTADMIN_ALL_SITES_AGGREGA”的隐藏列表。它存储来自所有 contentDB 的聚合网站集数据的缓存副本。

    https://graph.microsoft.com/v1.0/sites/tenant-admin.sharepoint.com/lists

    1. 获取所有网站

    https://graph.microsoft.com/v1.0/sites/tenant-admin.sharepoint.com/lists/90403211-a51b-4a2b-8e83-a569011b63f7/items?$expand=fields

    1. 使用过滤器获取所有个人网站

    https://graph.microsoft.com/v1.0/sites/tenant-admin.sharepoint.com/lists/90403211-a51b-4a2b-8e83-a569011b63f7/items?$expand=fields&$filter=fields/TemplateId eq 21

    BR

    【讨论】:

    • 这不起作用 - 运行第一个查询不会生成名为 DO_NOT_DELETE_SPLIST_TENANTADMIN_ALL_SITES_AGGREGA 的列表。
    猜你喜欢
    • 2020-10-07
    • 2021-07-31
    • 2018-05-12
    • 1970-01-01
    • 1970-01-01
    • 2019-10-02
    • 2022-06-29
    • 1970-01-01
    • 2014-07-23
    相关资源
    最近更新 更多