最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Python MS Graph API does not download all files from SharePoint folder - Stack Overflow

programmeradmin2浏览0评论

I have used Python script with REST APIs to download and upload files from/to SharePoint till now. It was working fine. However due to certain constrains I need to switch to MS graph APIs to download and upload files. I have observed Graph APIs doesn't download all files from SharePoint. for e.g. SharePoint folder contains 228 files, where as only 200 files are getting download & latest files are not getting download.

How to solve this?

My file download URLs is something like

file_download_url =  f".0/sites/{site_id}/drives/{drive_id}/root:/{Sharepointfolder}:/children"

I have used Python script with REST APIs to download and upload files from/to SharePoint till now. It was working fine. However due to certain constrains I need to switch to MS graph APIs to download and upload files. I have observed Graph APIs doesn't download all files from SharePoint. for e.g. SharePoint folder contains 228 files, where as only 200 files are getting download & latest files are not getting download.

How to solve this?

My file download URLs is something like

file_download_url =  f"https://graph.microsoft/v1.0/sites/{site_id}/drives/{drive_id}/root:/{Sharepointfolder}:/children"
Share Improve this question edited Mar 24 at 16:02 President James K. Polk 42.1k29 gold badges109 silver badges145 bronze badges asked Mar 18 at 15:45 DD08DD08 772 silver badges12 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

From List children of a driveItem

If a collection exceeds the default page size (200 items), the @odata.nextLink property is returned in the response to indicate more items are available and provide the request URL for the next page of items. You can control the page size through optional query string parameters.

发布评论

评论列表(0)

  1. 暂无评论