This post was most recently updated on December 24th, 2020.2 min read.
If you’re working on SharePoint deployments, and aren’t familiar with SharePoint Search Query Tool, you’re probably doing something wrong. Or you’ve gotten a really troublefree tenant and simple requirements.. :) At least for technical issues, it’s the #1 tool for debugging what’s in the index and what isn’t. This blog post describes how to use it to investigate SharePoint Online Search index issues.
This blog post is about using SharePoint Search Query Tool to investigate search index issues in SharePoint Online. First of all, you can get the tool from here: https://github.com/SharePoint/PnP-Tools/tree/master/Solutions/SharePoint.Search.QueryTool.
Logging in to strange or difficult SharePoint Online sites
If you’re like me, you have a lot of different customers/partners/friends or family, who all have different tenants and use different authentication methods. The tool does support logging in with pretty much any user account you might have on your hands, but sometimes messes up with federation or caching the credentials.
However, for the SharePoint Online site login the application seems to use internal browser login dialogue, which remembers and caches your earlier credentials, which might be sometimes tricky, because it might make it difficult to use the credentials you should be using.
Clicking this link opens up a login dialog, and depending on the type of the site and your last login, you may or may not see the option to change the account. In the screenshot below I actually could use a cloud login… But the description text was blocking the option to change accounts! Pretty annoying, eh?
Well, that’s just plain annoying!
Even when there’s no option to use another account or authentication is redirected directly to login screen (probably happens with some ADFS scenarios), it’s possible to change the site against which you’re authenticating with the following trick. The logic screen is technically an internal browser, right? It actually works as one, too. Press CTRL+L, and it’ll open you Internet Explorer’s “open”-popup – which accepts urls!
On that textbox you can just write “https://login.microsoftonline.com/” and it’ll redirect you to cloud login (so you won’t be forced to the ADFS login). Pretty cool, huh?
Fetching all Managed Properties
To be able to view all managed properties from the items in the search index, add this text to your Refiners -textbox:
Other points and tips
As always, remember to disable “Trim Duplicates” by unchecking the checkbox under “Query Text” textarea. When has that functionality actually served it’s purpose, anyway?
- Azure Function build fails with “Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: Microsoft.AspNetCore.Mvc.Core” - December 1, 2021
- How to update from deprecated Microsoft.Azure.Services.AppAuthentication to new and shiny Azure.Security.KeyVaults.Secrets? - November 23, 2021
- Fixing Blazor WebAssembly .NET 6 MSAL authorization bug - November 16, 2021