web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Reindex SharePoint Doc...
Power Apps
Unanswered

Reindex SharePoint Document Library using Power Automate

(0) ShareShare
ReportReport
Posted on by 147

 

Hello

Can we Re-index SharePoint Document Library using Power Automate ?

 

Thanks

ananda

 
 

 

Categories:
  • 365-Assist Profile Picture
    2,327 Moderator on at

    1 - You would probably get a better response posting this in the Power Automate Community General Power Automate Discussion - Power Platform Community (microsoft.com)

     

    2 - Why would you want to conduct this Admin task as part of Power Automate?

     

    ---------------------------------------------------
    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

    Subscribe: https://www.youtube.com/channel/UCFpvUlpx84FuIPOdInGKMTw
    Twitter: https://twitter.com/assist_365

    Regards
    Darren Lutchner - 365 Assist

  • RusselThomas Profile Picture
    4,014 on at

    Hi @ananda ,

    Unless you plan to use RPA or serverless functions to achieve this, the short answer is probably "no".

    Indexing in SharePoint is done according to a schedule and is typically incremental as performing an initial index is heavily resource intensive, and manual re-indexing is typically used to incorporate new schema changes, not to refresh the index. 

    As I'm sure you're already aware, forcing a re-index comes with the following caution,

    "Reindexing a site can cause a massive load on the search system. Don't reindex your site unless you've made changes that require all items to be reindexed."

    I'm not aware of any SPO REST API methods that will allow you to trigger this programatically, but this might perhaps be an avenue of research for you.  

    The last approach may be to use RPA to do this, but again - heavy caution.

    As per @365-Assist 's response, perhaps sharing what you're trying to achieve and why might open up other avenues of exploration?

    Kind regards,

    RT

  • Ananda Profile Picture
    147 on at

    Hello Russel Thomas

    Thank you for your thoughts. I'm not re indexing the entire site, Only the document library, Which is connected to my app. Thinking below solution.
    Pnp Power Shell for re indexing library and put it in Azure functions and schedule it. at 30 minutes interval.

    Need to check how it works.

    Thanks 

  • RusselThomas Profile Picture
    4,014 on at

    Hi @ananda ,

    The key is still the method - whether using SPO PowerShell cmdlets or REST API, I'm not aware of any methods (for SharePoint Online anyway) that would allow you to queue a trigger to reindex a specific library. 

    I'm also taking into consideration that unlike SharePoint on premises, the SharePoint Online crawl schedule is something Microsoft manages - not tenants.  

    You might notice that on the manual button for reindexing a library the wording is as follows;

    "Click the Reindex Document Library button to reindex all of the content in this document library during the next scheduled crawl." - so when you use this, you're just queuing a request to reindex when the crawler runs again, you're not actually triggering the crawler.

    The way I understand it, it's unlikely you're going to find what you're looking for.  Let me know if you do find something though, I'm always happy to be proved wrong!

    Kind regards,

    RT

     

     

  • Ananda Profile Picture
    147 on at

    Hello RT

    Thanks for the inputs.

    "Click the Reindex Document Library button to reindex all of the content in this document library during the next scheduled crawl."

    Default time interval is 15 minutes , so let it schedule it for next run. Below piece of code should work.

    $ListName="Projects"
    Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential)
    Request-PnPReIndexList -Identity $ListName


    Let see how it works.

    But I have a catch now. I have to hide the library for users and Re Index will not work on hidden list/ library. which I noticed just now.

     

    Thanks

    ananda

  • RusselThomas Profile Picture
    4,014 on at

    Hi @ananda ,

    That sounds odd - I thought 'hiding' a library was simply removing the quick launch nav option...doesn't make sense that it would affect reindexing...very odd.

    Good luck, and let us know how it goes!

    Kind regards,

    RT

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard