SharePoint Migration Throttling: Handle HTTP 429 and 503
| Symptom | First check | Next action |
|---|---|---|
| HTTP 429 | Retry-After and request volume | Wait, then reduce competing work and retry within a bounded policy |
| HTTP 503 | Retry-After, service health, and repeated failures | Wait; investigate persistent errors rather than retry forever |
| Timeout after a write | Whether the destination already contains the change | Verify before replaying an upload or metadata update |
| Access denied or invalid path | Permissions, target configuration, and the exact error | Fix the cause; a throttling retry loop is not the remedy |
When a migration slows down, adding workers is not always the answer. SharePoint Online returns HTTP 429 when a client exceeds usage limits and HTTP 503 when the service is not ready to handle a request. Microsoft documents a Retry-After header for both responses and notes that throttled requests still count toward usage limits. (Microsoft Learn: avoid getting throttled or blocked in SharePoint Online) Start by recording the status and wait instruction, not by restarting every batch.
What causes SharePoint migration throttling?
SharePoint protects service reliability by limiting calls and operations within time windows. Microsoft describes user, application, and tenant limits, with some API costs expressed as resource units. Requests are not all equivalent, and activity from other workloads can compete with your copy job. (Microsoft Learn: avoid getting throttled or blocked in SharePoint Online) Avoid treating any published limit as a guaranteed number of files per minute.
Inventory the migration's actual work: current files, historical versions, metadata, permissions, and verification reads. A library with deep history is a different workload from the same number of current files. Measure a representative pilot and retain its error log. Do not infer the whole cutover window from a folder containing only a few small documents.
Honor Retry-After before retrying
Pause for the delay returned by SharePoint before retrying or issuing another affected request. Microsoft warns that ignoring Retry-After can cause more throttling; persistent offending patterns can be blocked. (Microsoft Learn: avoid getting throttled or blocked in SharePoint Online) In a multi-worker client, coordinate the pause across the affected workload rather than allowing other workers to keep hammering it.
Use a finite retry budget. When the header is absent, an increasing fallback delay with jitter is a client design choice, not a Microsoft service limit. Never shorten a supplied delay to fit a cutover deadline. If it is too long for your retry budget, stop and investigate instead of sending early.
PowerShell example: retry a read, not an arbitrary write
This illustrative PowerShell 7 example retries an authenticated GET only. It assumes you already obtained an authorized access token; do not hardcode tokens or log authorization headers. The fallback values are example settings, not Microsoft recommendations. It stops after five attempts and waits at least the server's supplied delay when present.
# PowerShell 7; $uri and $accessToken supplied by your authorized session
for ($attempt = 0; $attempt -lt 5; $attempt++) {
$headers = @{ Authorization = "Bearer $accessToken" }
$response = Invoke-WebRequest -Uri $uri -Method Get -SkipHttpErrorCheck -Headers $headers
if ($response.StatusCode -notin @(429, 503)) {
if ($response.StatusCode -ge 400) { throw "HTTP $($response.StatusCode)" }
$response.Content
break
}
if ($attempt -eq 4) { throw "Retry budget exhausted" }
$seconds = 0
$header = [string]($response.Headers['Retry-After'] | Select-Object -First 1)
if (-not [int]::TryParse($header, [ref]$seconds) -or $seconds -lt 0) {
$seconds = [int][Math]::Pow(2, $attempt + 1)
}
Start-Sleep -Seconds ($seconds + (Get-Random -Minimum 0 -Maximum 3))
}C# example: respect the header and allow cancellation
This read-only example uses an already configured HttpClient and CancellationToken. It handles both the delay and date forms supported by the typed HTTP header. Creating a fresh GET on each attempt avoids replaying an already-sent request object. Add workload-level coordination if your real client has multiple workers.
for (var attempt = 0; attempt < 5; attempt++)
{
using var response = await client.GetAsync(uri, cancellationToken);
var status = (int)response.StatusCode;
if (status != 429 && status != 503)
{
response.EnsureSuccessStatusCode();
return await response.Content.ReadAsStringAsync(cancellationToken);
}
if (attempt == 4) throw new HttpRequestException("Retry budget exhausted");
var retry = response.Headers.RetryAfter;
var delay = retry?.Delta ??
(retry?.Date is DateTimeOffset date
? date - DateTimeOffset.UtcNow
: TimeSpan.FromSeconds(Math.Pow(2, attempt + 1)));
if (delay < TimeSpan.Zero) delay = TimeSpan.Zero;
await Task.Delay(delay + TimeSpan.FromMilliseconds(Random.Shared.Next(0, 1000)),
cancellationToken);
}
throw new HttpRequestException("No successful response");Do not blindly replay failed writes
A timeout or lost connection can leave you uncertain whether an upload completed. Before retrying a write, check the target file, version, or item and use the migration tool's documented re-run behavior. Otherwise, a retry can create duplicate items or extra versions. Keep batches small enough to reconcile, and preserve a record of the last confirmed result.
Reduce pressure without redesigning the tenant
- Honor the wait instruction and reduce simultaneous jobs sharing the same source or target.
- Schedule heavy work outside regional peak hours where possible. Microsoft identifies nights and weekends as typical off-peak periods, not a guarantee. (Microsoft Learn: avoid getting throttled or blocked in SharePoint Online)
- Keep the intended information architecture. Splitting content across sites solely to evade limits is not a reliable migration strategy.
- Re-run a representative batch, compare errors and completed work, and adjust one setting at a time.
- Verify files, versions, metadata, and approved access before declaring the cutover complete.
Where Smart Copy fits
Smart Copy offers Migration API and Enhanced REST copy modes; the install guide describes their access requirements. Microsoft's Migration API uses packaged content and a server-side import pipeline. (Microsoft Learn: SharePoint Migration API overview) Choosing that pipeline is not a promise that throttling disappears. Pilot the mode that fits your permissions and fidelity requirements.
Smart Copy copies SharePoint, OneDrive, and Teams files with full version history in one tenant or between tenants with identity mapping, and also copies teams and supported conversations. Exchange mail is handled separately by Smart Mailbox Copy. For the combined workflow, read the three-tool tenant copy guide; for file batches, read the large-library migration guide.
Planning a time-sensitive cutover? Our team can help scope the pilot, verification, and migration window. Talk to us.
Get your first result in about 10 minutes
Copy sites, libraries, lists and pages with full version history. Free, MIT licensed, no sign-up.
- Download the Windows app from the latest release.
- Run it and sign in to your Microsoft 365 tenant.
- Pick a source and target site, then copy.
Email me when a new release ships
No marketing spam. One short email when a new release ships. You can unsubscribe anytime.
Was this page helpful?
One click. No form, no email address.
Missing something in SharePoint Smart Copy? Feature requests and bug reports go straight to the developer on GitHub — no account needed to read, free account to post.
Request a featureRelated tool
SharePoint Smart Copy
Copy sites, libraries, lists and pages with full version history. Free, MIT licensed, no sign-up.
Keep reading
How to Copy SharePoint, Teams, and Exchange Between Tenants with Free Tools
A practical three-tool workflow for content, conversations, mail, and access review—with explicit limits and a separate cutover plan.
Microsoft Teams and SharePoint Sites: Standard, Private, and Shared Channels
A team is not always one SharePoint site. Map channel sites, permissions, ownership, and retention before cleanup or migration.
How to Migrate a Large SharePoint Document Library Without Timeouts or Throttling
One giant copy job is the most common reason large library migrations stall. Here is how to break the move into batches, pre-seed it and verify the result.
Need expert hands on deck?
Let our team plan and run your SharePoint migration
Full-service file and metadata migrations across sites, tenants, or from on-premises to SharePoint Online, from planning and test runs to verification and cutover.
About the author
Sean Regan
SharePoint & Microsoft 365 consultant with 20+ years of hands-on experience building SPFx web parts, migration tooling and tenant-grade automation. Maintainer of the open-source SharePoint Smart Solutions suite.
