【发布时间】:2015-01-07 22:23:36
【问题描述】:
在 Windows 商店应用程序上工作: 我正在尝试访问 office365 文档库的文件和文件夹。 我可以访问此链接Common file tasks using the Office 365 client library
中描述的单驱动器文档但它不提供访问 onedrive 文档库以外的文件和文件夹的方法。 例如 [https://my-office365-tenant.sharepoint.com/mysite/mydocumentslibrary]
但是我尝试了一种方法,它确实获取了 onedrive 以外的文件和文件夹。 我没有使用我创建的 SharePointClient 的任何功能,如下所示:
var client = new SharePointClient(new Uri("https://my-office365-tenant.sharepoint.com/mysite"),
async () => await AcquireTokenAsync(AuthenticationContext, "https://my-office365-tenant.sharepoint.com"));
IPagedCollection<IItem> items = await client.Files.ExecuteAsync();
通过这种方式,我在“mysite”中获取默认“共享文档”文档库的文件,但我想在同一站点“mysite”中获取另一个文档库“mydocumentslibrary”的文件和文件夹。
谁能指导我如何做到这一点,或者我错过了什么?或者还有其他方法可以仅使用 office365 api 来做到这一点。
【问题讨论】:
标签: sharepoint windows-store-apps office365