OneDrive REST API和Sharepoint Online [英] OneDrive REST API and Sharepoint Online

查看:137
本文介绍了OneDrive REST API和Sharepoint Online的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用OneDrive API(MS图)访问OneDrive免费帐户和OneDrive for business的应用程序.

I have the app that uses OneDrive API (MS graph) to access OneDrive free accounts and OneDrive for business.

该应用正常运行. 在API的文档中,我可以看到相同的API也可以用于访问Sharepoint Online网站数据.

The app works fine. In docs of the API i can see same API can be used also to access Sharepoint Online sites data.

如何执行此操作?当我对具有Sharepoint Online帐户和MS图表的用户进行身份验证时,只有他的驱动器(ondrive),但没有列出他的站点.

How to do this? When i auth a user who has Sharepoint Online account with MS graph, there is only his drive (ondrive) but there is no his site listed.

如何也使用相同的API访问他的共享点网站?

How to get access to his sharepoint site too using same API?

推荐答案

我发现了如何使用Graph API处理网站.

I have found how to work with sites using the Graph API.

要获取网站列表,请致电

To get list of sites there is the call

GET /v1.0/sites/

然后使用SITEID获取驱动器列表(实际上是顶级文件夹)

Then use the SITEID to get list of drives (in fact, top level folders)

GET /v1.0/sites/SITEID/drives

然后获取驱动器用户的内容

Then to get contents of a drive user

GET /v1.0/sites/SITEID/drives/DRIVEID/root/children

所有下一次呼叫都与单驱动器驱动器相同

And all next calls are same as for onedrive drive

但是,仍然有我无法解决的问题.如何创建新的顶级文件夹(站点上的新驱动器).没有为此的API调用

However, there is the problem i still can not solve. How to create new top level folder (new drive on a site). There is no API call for this

这篇关于OneDrive REST API和Sharepoint Online的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆