I would need to manually call re-index for a SP List in SP Online like once/twice a day.

Is there any PowerShell/ MS Graph solution for this?

This list is having a lot of items on it that are being deleted / created on daily basis and I need search to be working with current items and not point to the old deleted ones.

I need to implement that into a code. Solution of clicking the button in advanced settings is not desired.


Below is the PnP PowerShell to re-index a SharePoint Online list or library

#Config Variables
$SiteURL = "https://crescenttech.sharepoint.com"

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)

#Request Reindex
Request-PnPReIndexList -Identity $ListName

Reference: SharePoint Online: How to Reindex a List or Document Library using PowerShell?

  • awesome, thanks, will try to implement that to my project in C#. By the way, aren't you aware if there is something similar in MS Graph? – Marek Kyzivát Oct 8 at 12:27
  • Not exactly. I am not sure if this is even possible using MS Graph. – Ganesh Sanap Oct 8 at 12:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.