500 Internal Server Error
Situations in the vault where SharePoint, SPFx, Microsoft Graph or the Azure services around them answer with HTTP 500. Each one explains why it happens and how to fix it.
- "Invalid text value" (HTTP 500) means a Text column hit its 255-character limitgotchas / rest-apiGeneric 500 naming no field; a Text column capped at 255
- A page-size cap reported as a findinggotchas / rest-apiA round number (100 / 500 / 999 / 5000) is the tell; the limit of the request presented as a measurement of the tenant, then cached
- CreateCopyJobs: the library root is refused, progress logs are handed out once, and JobWarning is not a failuregotchas / rest-apiPassing a document library's root folder URL to CreateCopyJobs fails with HTTP 500 "Null value for source item" while a subfolder URL copies the folder with its content; several file names containing the hash sign…
- Creating a modern page via REST is a three-step dance, not one POSTgotchas / rest-apiCanvasContent1 won't stick on create; create → SavePageAsDraft → Publish, canvas is JSON; plain JSON is enough, Description needs its own write and a re-publish; the file name is random — rename with moveto
- fields/getbyinternalnameortitle returns 400, not 404, for a missing fieldgotchas / rest-apiIt throws ArgumentException (HTTP 400), not 404; an existence-check that hard-fails on non-404 breaks the "field missing → create" path, and one that creates on any non-200 duplicates the column when throttled
- A generated PowerShell script that embeds file names in a here-string runs code under the admin who runs itgotchas / powershellData that tenant users can name (file paths, titles) breaks every textual PowerShell literal – expandable here-strings run $(…), ; splits CSV rows, '@ ends a literal here-string; embed data as base64 JSON instead
- Title and Created are the fields you filter on — and the ones your provisioning code never indexesgotchas / listsProvisioning indexes only the columns it creates, so the most-filtered fields stay unindexed; past 5,000 items the read throttles and a swallowed error in a write path stops all writes silently
- Migrating list items with original authors, dates — and their version historygotchas / listsCopy and Move does not do lists, but REST does the job item by item — AddValidateUpdateItemUsingPath takes Author, Editor, Created and Modified at creation (one call, one version), version history can be replayed with…
- MajorVersionLimit: 0 means unlimited, not nonegotchas / listsOne integer covering "no limit", "keep n" and "versioning is off"; the library your report calls tidiest is the one eating the quota
- Search REST returns 500 "unknown error" and 429 "low resources" for minutes at a time — retry the read, don't fix the querygotchas / searchSharePoint Search REST can fail for a few minutes with HTTP 500 SearchServiceException (no Retry-After) and HTTP 429 low-resources errors; the same query succeeds seconds later, so retry reads briefly with a fixed…
- Search REST API needs odata-version 3.0gotchas / rest-apiThe header behind mysterious search 500s
- The 5,000-item list view threshold — and why indexes must come earlygotchas / listsIt's scanned rows, not returned rows; index early, page always