SharePoint indexing often fails silently, causing slow search and missing results. This guide shows exactly how to configure SharePoint indexing end-to-end—site settings, list-level indexing, search schema, and safe automation—so your users get fast, accurate results. Primary keyword: SharePoint indexing.
The Problem
Content updates are not discoverable, queries are slow, and filters return inconsistent items because lists aren’t indexed, sites aren’t reindexed, or managed properties are not mapped. You need a repeatable approach to fix indexing across sites and automate reindexing safely.
Prerequisites
- Microsoft 365 tenant with SharePoint Online
- PowerShell 7+ and PnP.PowerShell module (Install-Module PnP.PowerShell -Scope CurrentUser)
- Role-based access (least privilege):
- Site Owner or above for list/site indexing and reindex
- Search Schema changes typically require SharePoint Administrator
- Automation with app-only: Entra ID App with Sites.Selected + site-scoped permissions
- Optional for automation: Azure Automation or Azure Functions with a System-Assigned Managed Identity
The Solution (Step-by-Step)
1) Confirm site-level indexing is allowed
Site Owners can check if content is visible to search crawlers.
- Go to Site Settings → Search → Search and offline availability
- Set Allow this site to appear in search results to Yes
Pro-Tip: If you changed this from No to Yes, trigger a site reindex to speed up propagation.
2) Index columns at the list/library level
Index columns used in filters, sorts, and query rules to avoid throttling and improve query performance.
- Open your list/library → Settings → Indexed columns → Create a new index
- Index only frequently queried columns (e.g., Status, Department, Created)
Pro-Tip: Avoid indexing lookup or multi-line rich text columns unless absolutely necessary; they can increase index size and crawl churn.
3) Reindex a list or library (targeted)
Use targeted reindex after column or schema changes on a specific list.
- List Settings → Advanced settings → Reindex List
This flags the list for the next crawl so updated properties and new mappings are applied faster.
4) Reindex a site (broad fix)
Use this when you changed site-level search settings, content types, or many lists.
- Site Settings → Search → Search and offline availability → Reindex site
Pro-Tip: Reindexing a site is heavier than a list reindex. Prefer list reindex when possible to reduce crawl load.
5) Map crawled properties to managed properties (search schema)
To make custom columns queryable/filterable/sortable, map crawled properties to managed properties with the right search attributes (Searchable, Queryable, Retrievable, Refinable, Sortable).
- SharePoint Admin Center → More features → Search → Open
- Manage Search Schema → Managed Properties
- Create or edit a managed property (e.g., RefinableStringXX)
- Map the relevant crawled property (e.g., ows_Status)
Pro-Tip: Use reserved RefinableStringXX or RefinableDateXX for facets and filters to avoid schema conflicts.
6) Automate reindex with PnP.PowerShell (interactive)
# Install PnP.PowerShell if needed
# Install-Module PnP.PowerShell -Scope CurrentUser
# 1) Interactive login for an admin or site owner
Connect-PnPOnline -Url "https://contoso.sharepoint.com/sites/ProjectA" -Interactive
# 2) Reindex a single list by title
# This sets the reindex flag so the next crawl refreshes properties
$web = Get-PnPWeb
$list = Get-PnPList -Identity "Documents"
Set-PnPList -Identity $list -NoCrawl:$false # Ensure list is crawlable
Request-PnPReIndexList -Identity $list # Mark list for reindex
# 3) Reindex the entire site (use sparingly)
Request-PnPReIndexWeb
# 4) Verify a column is indexed
# Returns indexed column definitions for the list
(Get-PnPField -List $list) | Where-Object { $_.Indexed -eq $true } | Select-Object InternalName, Title
Comments:
- Request-PnPReIndexList and Request-PnPReIndexWeb mark content for recrawl.
- Set-PnPList -NoCrawl:$false ensures the list is included in search.
- Use least privilege: Site Owner is sufficient for list-level operations.
7) Secure automation with Managed Identity or app-only (no secrets)
For production jobs, avoid interactive auth and stored passwords. Use a Managed Identity (Azure Automation/Functions) or an Entra ID app with Sites.Selected and scoped permissions to specific sites.
# Option A: Managed Identity (runs inside Azure with System-Assigned MI)
# Prereqs:
# - Assign the Managed Identity Sites.Selected permissions and grant site-level rights
# - Use Grant-PnPAzureADAppSitePermission to scope access to the target site
# Connect using Managed Identity
Connect-PnPOnline -Url "https://contoso.sharepoint.com/sites/ProjectA" -ManagedIdentity
# Reindex specific list
Request-PnPReIndexList -Identity "Documents"
# Option B: Entra ID App with certificate (app-only, least privilege)
# Prereqs:
# - App registration with Microsoft Graph Sites.Selected (Application) permission
# - Admin consent granted
# - Grant site-level permission:
# Grant-PnPAzureADAppSitePermission -AppId <CLIENT_ID> -DisplayName "Indexer" -Site "https://contoso.sharepoint.com/sites/ProjectA" -Permissions Read
# - Upload certificate and use its thumbprint
$tenant = "contoso.onmicrosoft.com"
$siteUrl = "https://contoso.sharepoint.com/sites/ProjectA"
$clientId = "00000000-0000-0000-0000-000000000000"
$thumb = "THUMBPRINT_HERE"
Connect-PnPOnline -Url $siteUrl -ClientId $clientId -Tenant $tenant -Thumbprint $thumb
# Safely trigger reindex
Request-PnPReIndexList -Identity "Documents"
Comments:
- Sites.Selected lets you grant per-site permissions, enforcing least privilege.
- Avoid legacy ACS app-only. Prefer Entra ID + Sites.Selected or Managed Identity.
- No secrets in code; use certificates or Managed Identity.
8) Validate search consistency
- Use Microsoft Search to query values you expect to find (e.g., Status:Active)
- Validate refiners show the expected values (requires RefinableStringXX mapping)
- Check list view performance with indexed columns applied as filters
Best Practices & Security
- Principle of Least Privilege:
- Day-to-day indexing: Site Owner
- Search Schema: SharePoint Administrator (only when needed)
- Automation: Managed Identity or app with Sites.Selected scoped to the target sites
- Authentication:
- Prefer Managed Identity in Azure Automation/Functions
- Else use certificate-based app-only; avoid passwords and client secrets
- Search Schema Hygiene:
- Reuse RefinableStringXX/DateXX for facets and filters
- Document managed property usage to prevent collisions across teams
- Performance:
- Index only columns that improve key queries
- Prefer list reindex over site reindex to reduce crawl load
Pro-Tip: Create a small pilot list to test new mappings and reindex timings before applying to large libraries.
Troubleshooting
- My column values don’t appear in search:
- Confirm list is crawlable (NoCrawl = false)
- Ensure a managed property is mapped and set to Queryable/Retrievable
- Trigger Request-PnPReIndexList and wait for the next crawl cycle
- Refiners don’t show my custom metadata:
- Use a RefinableStringXX or RefinableDateXX managed property
- Map the correct crawled property (often ows_ColumnInternalName)
- App-only connection fails with 401/403:
- Verify Sites.Selected consent and site-level grant (Grant-PnPAzureADAppSitePermission)
- Confirm certificate thumbprint and validity
- Reindex seems to do nothing:
- Allow time for the next crawl; reindex sets a flag, it doesn’t force immediate recrawl
- Check Service Health and Message Center for crawl incidents
Summary
- Index the right columns and map to managed properties to make content queryable, refinable, and fast.
- Use targeted list reindex first; reserve site reindex for broad changes.
- Automate safely with Managed Identity or Sites.Selected app-only to enforce least privilege and avoid secrets.