Forum Discussion
Hide Personal OneDrive Results from Search
While it's generally not recommended to hide OneDrive content from Microsoft Search—since results are security-trimmed and only visible to the file owner or those with access—if you still wish to remove these results for clarity or user experience, you can try the following options:
Option 1: Rest Query Filter
Exclude OneDrive results from search by adding a filter to your query:
AND NOT path:"https://yourtenant-my.sharepoint.com/*"
Option 2: Site Settings
Each user's OneDrive is a SharePoint site. You can disable indexing by visiting:
https://yourtenant-my.sharepoint.com/personal/username/_layouts/15/srchvis.aspx
Then set “Allow this site to appear in search results?” to No.
The change does not take effect immediately. Instead, it depends on when the site is next crawled and reindexed by Microsoft Search.