访问sharepoint网站以外的文件和文件夹';s使用office365 api的默认共享文档

访问sharepoint网站以外的文件和文件夹';s使用office365 api的默认共享文档,sharepoint,windows-store-apps,office365,Sharepoint,Windows Store Apps,Office365,使用windows应用商店应用程序: 我正在尝试访问office365文档库的文件和文件夹。 我可以访问此链接中描述的单驱动器文档 但它不提供访问onedrive文档库以外的文件和文件夹的方法。 e、 g[ 然而,我尝试了一种方法,它确实得到了文件和文件夹,而不是onedrive。 我没有使用我创建的SharePointClient的任何功能,如下所示: var client = new SharePointClient(new Uri("https://my-office365-tenant.

使用windows应用商店应用程序: 我正在尝试访问office365文档库的文件和文件夹。 我可以访问此链接中描述的单驱动器文档

但它不提供访问onedrive文档库以外的文件和文件夹的方法。 e、 g[

然而,我尝试了一种方法,它确实得到了文件和文件夹,而不是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();
var-client=新的SharePointClient(新的Uri(“https://my-office365-tenant.sharepoint.com/mysite"),
async()=>等待AcquireTokenAsync(AuthenticationContext,“https://my-office365-tenant.sharepoint.com"));
IPagedCollection items=wait client.Files.ExecuteAsync();
通过这种方式,我可以在“mysite”中获取默认的“共享文档”文档库的文件,但我希望在同一站点“mysite”中获取另一个文档库“mydocumentslibrary”的文件和文件夹


有人能告诉我怎么做,或者我遗漏了什么吗?或者只有使用office365 api才有其他方法可以做到这一点。

我刚刚浏览了这个新api的文档,似乎文件操作仅限于一个驱动器,我怀疑你能否在另一个文档库中获取文件

要在开发windows应用商店应用程序时获取其他文档库中的文件,可以使用SharePoint mobile object model或REST API:


  • API仅允许访问默认文档库。示例:

    OneDrive for Business:https://{tenant}-my.sharepoint.com//\u api/v1.0/me


    SharePoint网站:https://{tenant}.SharePoint.com/{site path}/_api/v1.0

    谢谢。我知道我可以使用,但我们必须使用office365 api。您告诉我们的选项是我们最后的选择。