如何获取 office365 onedrive 中包含的所有项目项目、onedrive

2023-09-06 17:12:52 作者:我们合不来也分不来 &

I want to get all the files and folders contained inside a office365 onedrive folder in one rest API call, is there any option to do it?

解决方案

There isn't a specific API call to retrieve a flat representation of a Drive. You can achieve a similar effect however using the drive's search method.

免费获取Office365以及Onedrive5T的链接

Simply pass an empty query string and it will return metadata for each file (regardless of it's directory):

https://graph.microsoft.com/v1.0/me/drive/root/search(q='')