学习图形API时,我试图使用Microsoft Graph API从SharePoint文档库中获取文件。
我首先尝试从Documents
访问https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com
中的文件
通过执行此GET请求:
https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com/drive/root:/Test:/children
一切正常,然后我尝试从同一租户中的另一个站点访问文档。我告诉自己,遵循Microsoft文档时,这是相同的途径。
我首先发出了一个测试请求,以确保我可以首先访问我的网站;这是我所做的;
https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com:/sites/ObserveTestSite
执行该查询时,我收到了200 OK
响应。
然后我尝试访问驱动器Documents
,这是我所做的;
https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com:/sites/ObserveTestSite:/drive
再次一切正常。
然后我使用root
关系,后跟目录名称,然后是children
关系;这是我的要求:
https://graph.microsoft.com/v1.0/sites/mediametrie.sharepoint.com:/sites/ObserveTestSite:/drive/root:/Test:/children
但是执行该命令时,我得到了Bad Request - 400 - 96ms
请帮助。
谢谢