#search 29 articles
"Search finds nothing here" is usually a site missing from the index — not a permissions problem gotchas / search Three queries tell you whether the site is in the index at all, before you debug a query that was never wrong A comma in a Graph permissions table can mean AND — searching Teams messages needs two scopes gotchas / graph Searching chatMessage needs Chat.Read and ChannelMessage.Read.All; the 403 spells it out, the table does not (+ webUrl vs webLink from the same endpoint) A library with NoCrawl returns nothing from Search — and silently blinds anything built on Search gotchas / search Excluded containers return 0 with HTTP 200 and no log, so Search-backed AI never sees them; provisioning that excludes data lists must not inherit that onto content libraries; reindex can't be forced over REST… A library your app provisions inherits the web's write permissions — and that is how an AI grounding source gets poisoned gotchas / security Any member can upload over REST and poison an AI grounded on that library; WriteSecurity: 4 does not fix it (Edit includes Manage Lists and bypasses item-level settings) — only unique permissions on the library do An unparenthesized OR in your KQL query silently escapes the scope filter gotchas / search KQL AND binds tighter than OR; wrapping the query in parens is necessary but NOT sufficient (text can break out of them), and an empty custom path list must not fall back to the whole tenant Building a people picker in SPFx — the endpoints that actually work gotchas / spfx SP Search People source + ensureuser; why the obvious endpoints fail Comparing SharePoint URLs — decode both sides first, then prefix-match on boundaries gotchas / search Normalize encoding + boundary-aware prefix, or matches never fire Don't trust the parsed-file-types table: SPO does full-text index .md gotchas / search The official table omits Markdown, yet live SPO full-text indexes it; probe before architecting Duplicate trimming hides exactly the file copies you are searching for gotchas / search Search collapses identical content by default, so a copy-finder returns "no copies" exactly when perfect copies exist; trimduplicates=false on duplicate-hunting queries only Enumerate every site from the browser console (no admin API, no tooling) gotchas / search contentclass:STS_Site OR STS_Web over Search REST lists every web the account can read, no admin role or tooling; plus the traps of a cross-site F12 sweep (Hidden filter, case-sensitive GetList, 400 vs 404, per-web… Fewer sites and sudden 403s usually mean a different account, not a tenant outage gotchas / security A tenant-wide snippet run from a second browser window executes as whoever is signed in there; print currentuser and the visible-site count before you blame the tenant Find externally / anonymously shared content via Search snippets / rest Oversharing / Copilot-readiness audit: ViewableByExternalUsers:1 surfaces files shared out, security-trimmed, one query Graph Search returns 0 hits — you passed the user's question as the queryString gotchas / search Translate question→keywords; "what's new" is a listing (* + default date sort, custom sort = 400); per-entity KQL only as documented Markdown vs DOCX vs site pages: choosing a knowledge format for RAG on SharePoint guides Markdown vs DOCX vs site pages vs list items — extraction quality, token economics, and the author-here-publish-Markdown pattern RAG finds nothing that SharePoint Search finds — the reasoning model spent the whole token cap thinking gotchas / search GPT-5/o-series count hidden reasoning in max_completion_tokens; a small cap on the query-generator call returns empty text (HTTP 200), and a raw-question fallback ANDs every word in KQL Reindex a library from code works even on a no-script site — the root folder's property bag is writable, the web's is not gotchas / rest-api Bumping vti_searchversion on the library's RootFolder property bag via CSOM succeeds on sites with custom scripts disabled (unlike the web property bag); find the library from any item URL with GetWebUrlFromPageUrl +… Scope SharePoint Search to hundreds or thousands of sites with RefinementFilters — and or() with one value returns nothing gotchas / search To restrict any Search query to an explicit list of site collections, POST to /_api/search/postquery with RefinementFilters SPSiteUrl:or(...) (tested with 3,000 URLs); a single value must use equals() because or() with… Search ignores unknown managed properties — silently gotchas / search A made-up property name returns HTTP 200 with full results; auto-created Choice properties are not queryable; probe with a fake name, map to RefinableString Search ParentLink points at a library view, not at the library gotchas / search Often …/Forms/AllItems.aspx, so used as a path it empties a Path: filter and can send a save into Forms while a GetList probe still passes; normalize on read and on write Search queries that actually work guides The one mandatory header, practical KQL, managed properties (RefinableString*), paging/sorting, and the freshness/trimming traps Search REST API needs odata-version 3.0 gotchas / rest-api The header behind mysterious search 500s Search REST returns 500 "unknown error" and 429 "low resources" for minutes at a time — retry the read, don't fix the query gotchas / search SharePoint 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… Sensitivity labels in SharePoint Search — the managed property works, but licensing gates it gotchas / search InformationProtectionLabelId returns a GUID only after AIP-enable + label + crawl; unlicensed tenants can't even create a label (InvalidLicenseException) SharePoint Search cannot see text inside images — and what that does to RAG gotchas / search The crawler indexes the text layer only, so a value that exists only in an embedded flyer or a scan can never be found by keyword: a search-then-read pipeline is in a closed loop, the LLM re-ranker drops such documents… SharePoint Search finds nothing for a question in an inflected language — add prefix-wildcard stems, and never turn zero hits into "latest documents" gotchas / search KQL is implicit AND and matches exact word forms, so Czech inflected forms miss; add a stem* variant in code, relax before giving up, and never serve a date-sorted inventory as sources for a specific question The crawl log DOES exist in SharePoint Online — it just isn't where you look for it gotchas / search Reachable only through CSOM DocumentCrawlLog via /_vti_bin/client.svc/ProcessQuery, gated by a separate Crawl Log Permissions grant that no admin role implies; returns ~52 columns incl. per-pass crawl timestamps… Two KQL restrictions on the same property separated by a space are OR-ed — a range needs AND gotchas / search KQL joins restrictions on the SAME managed property with OR when only a space separates them, so a size or date range written as two restrictions matches every item; write ranges with explicit AND or a..b ViewsX managed properties — sortable only by ViewsLifeTime gotchas / search Windowed counts select but don't sort; re-rank client-side What each format costs the model: tokens for the same content as .md, .docx, .pdf and a SharePoint page guides Real numbers: the same article as .md/.docx/.pdf/a SharePoint page — why extraction, not format, drives the token bill; plus a CZ-vs-EN language tax and a reproducible harness