C# 如何通过sharepoint共享链接获取文件夹

C# 如何通过sharepoint共享链接获取文件夹,c#,sharepoint,csom,.net-core-3.1,C#,Sharepoint,Csom,.net Core 3.1,我有指向sharepoint文件夹的链接,如https://:x:/s//EcEHhjfer8tBhw84D4iadQUBdCcX_MGw-EpH_lqwxupjw?e=pBgWZS 如何使用CSOM获取文件夹(如文件列表) 对于文件,我使用了如下内容: var file = context.Web.GetFileByUrl(sharedLink); context.Load(file); await context.ExecuteQueryAsync(); 但对于文件夹,我找到了任何合适的方

我有指向sharepoint文件夹的链接,如https://:x:/s//EcEHhjfer8tBhw84D4iadQUBdCcX_MGw-EpH_lqwxupjw?e=pBgWZS

如何使用CSOM获取文件夹(如文件列表)

对于文件,我使用了如下内容:

var file = context.Web.GetFileByUrl(sharedLink);
context.Load(file);
await context.ExecuteQueryAsync();

但对于文件夹,我找到了任何合适的方法。

目前,没有可用的方法可以通过在CSOM中共享链接来获取文件夹

它仅支持使用ServerRelativeUrl:

context.Web.GetFolderByServerRelativeUrl("/Shared%20Documents/Folder1")
我建议您可以在以下SharePoint Online Development Platform中提交UserVoice: