Get all SharePoint files and folders of a drive using Microsoft Graph API

岁酱吖の 提交于 2019-12-01 08:40:46

问题


My problem is: if I call https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/root/children all I get are the top-level items of that drive.

How can I achieve to get all the subfolders and files of the drive?


回答1:


There's no endpoint to get all items in a drive with every file from every subfolder at once.

Below endpoint maps to a test library MyDoc3.

/sites/siteid/drives/{drive-id}

Then, below endpoint use to get children of FolderA in MyDoc3.

/sites/siteid/drives/{drive-id}/root:/FolderA:/children


来源:https://stackoverflow.com/questions/54496616/get-all-sharepoint-files-and-folders-of-a-drive-using-microsoft-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!