【问题标题】:How to find a SharePoint list based on its URL and list ID如何根据其 URL 和列表 ID 查找 SharePoint 列表
【发布时间】:2021-05-07 18:04:46
【问题描述】:

我有一个旧的 Azure 数据工厂管道,它加载一个 SharePoint 列表并将数据传输到数据湖中。 SharePoint 列表 URL (sharepointsite) 和列表 ID (sharepointlistid) 在 ADF 管道中作为参数找到。

如果我将列表 URL 和列表 ID 复制到浏览器并尝试访问该站点,浏览器会显示“您需要访问”或“未访问站点”。如何访问找到特定 SharePoint 列表的完整 URL?

【问题讨论】:

    标签: azure sharepoint azure-data-factory


    【解决方案1】:

    方法一:

    你可以试试下面的:

    <WEBURL>/_api/web/lists(guid '<LISTID>')
    

    如果你需要列表的标题:

    <WEBURL>/_api/web/lists(guid '<LISTID>')/title
    

    示例

    https://tenant.sharepoint.com/teams/sitename/_api/web/lists(guid'97760918-543a-4bdb-b2e7-0f5da634a2e8')/title
    

    方法二:

    就像你提到的,你可以访问的设置页面

    WebURL/_layouts/15/listedit.aspx?List={<ListID>}
    

    示例

    https://tenant.sharepoint.com/teams/sitename/_layouts/15/listedit.aspx?List={97760918-543a-4bdb-b2e7-0f5da634a2e8}
    

    【讨论】:

      【解决方案2】:

      我在这里找到了答案:https://global-sharepoint.com/sharepoint-online/get-sharepoint-list-url-by-list-id/

       Construct the URL to get the “list title” from list edit page like below:
      
       “Site URL”+”/_layouts/15/listedit.aspx?List=”+ListID
      

      所以,如果我的 SharePointsite URL 是 https://mycompany.sharepoint.com/teams/data-group 并且 SharePointlistid 是 24312jsd-1252-sa45-034f-12ffhhhhhaaa,那么我可以通过输入访问特定的 Sharepoint 列表站点

       https://mycompany.sharepoint.com/teams/data-group/_layouts/15/listedit.aspx?List=24312jsd-1252-sa45-034f-12ffhhhhhaaa
      

      到我的浏览器并按回车键。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-09-26
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多