How to Bulk Upload Large Datasets to SharePoint Lists Using REST API
Question details
The user needs to bulk upload tens of millions of rows into a SharePoint list using the REST API, but the operations fail due to payload size limits and syntax errors.

- Product
- SharePoint
- Device & OS
- not provided
- Scenario
- Migrating or pushing massive volumes of data (tens of millions of records) into a SharePoint list.
- Observed behavior
- Large single API operations or oversized batch requests result in bad requests, syntax errors, and failures due to REST API payload and throttling limits.
Evaluate the total size and row count of your dataset before initiating an API upload. Keep in mind that SharePoint lists are optimized for content management rather than serving as high-volume data warehouses.
Optimize Batch Uploads for SharePoint REST API
Split your large dataset into smaller, manageable chunks to respect SharePoint's batch request limits and avoid payload size errors.
When you must use SharePoint lists, never attempt to upload millions of rows in a single API call. Breaking the data into smaller batches ensures the server can process the payload without timing out or throwing bad request errors.
Configure your ingestion script to limit batch operations. A standard recommendation is to keep it under 100 requests per batch, ensuring the total payload size stays well under the 2MB to 3MB safe threshold.
Update your REST API code to catch '429 Too Many Requests' errors. Read the 'Retry-After' header in the HTTP response and pause your script for that exact duration before re-attempting the batch.
Add logging to your script to track the byte size of each JSON payload. If a batch encounters a syntax or bad request error, automatically halve the batch size dynamically and retry.

Migrate Massive Datasets to a Scalable Data Platform
Avoid using SharePoint lists as a primary database for tens of millions of records by leveraging enterprise-grade data platforms.
Enhance Your Document Workflows with WPS Office
While managing massive database architectures requires specialized platforms, your everyday document, spreadsheet, and data export tasks shouldn't be complicated. WPS Office offers a lightweight, high-performance alternative to Microsoft Office for analyzing your smaller datasets and reports.
- 1. Download and Install: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Open Your Data Exports: Launch WPS Spreadsheets and open your exported .csv or .xlsx files to instantly view and manipulate your dataset.
- 3. Analyze and Format: Use built-in pivot tables, formulas, and charting tools to analyze your data efficiently without the overhead of heavy software.

Frequently Asked Questions
What is the batch size limit for the SharePoint REST API?
SharePoint REST API batch requests generally support up to 100 individual requests per batch. Exceeding this limit, or generating a payload size that is too large, will result in bad request errors.
Why do I get a 429 Too Many Requests error when uploading to SharePoint?
This error indicates that SharePoint has throttled your requests to maintain server health. To resolve this, you must implement a retry mechanism with exponential backoff and strictly respect the 'Retry-After' value provided in the response header.
Can a SharePoint list safely hold tens of millions of items?
While a SharePoint list can technically store up to 30 million items, doing so requires complex indexing and strict view threshold management (the 5,000 items per view limit). It is highly recommended to use a traditional database instead.
How can I handle massive data sets if SharePoint REST API fails?
If you are dealing with tens of millions of rows, move your workloads to a dedicated database like Azure SQL Server, or leverage big data ingestion tools like Azure Data Factory and Microsoft Fabric.




