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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dataverse searchquery ...
Power Apps
Unanswered

Dataverse searchquery Web API Not Returning any Data Even Though Global Search Does

(0) ShareShare
ReportReport
Posted on by 223

Hey All,

 

I have an odd issue with getting data back from Dataverse using the Web API. I can connect to the endpoint just fine and I get a 200/OK http status. But there is no data returned by the searchquery API. 

Any thoughts? 

 

Here's a little more background: 

I have enabled search in my environment, added a few tables to be indexed via my PowerAutomate solution, then added columns to be indexed using the 'Quick Find' views of my custom tables as advised in this article Configure Dataverse search to improve search results and performance - Power Platform | Microsoft Learn.

I can successfully use the global search within my model-driven power app. I can also search using the 'Search rows (preview)' dataverse action in Power Automate. In both scenarios, I get search results. So it seems that I have a perfectly functioning search index. But why isn't the API returning any data? 

Here is the request/response from an "Invoke Http Request with Entra ID" action in Power Automate:
Target URI: https://MYENV.crm.dynamics.com

API:  /api/data/v9.2/searchquery

Request body: { "top": 10, "count": "true",
"search": "Same keyword I used in the other two scenarios here"
}
 

Response:
"body": {
"@odata.context": "https://MYENV.crm.dynamics.com/api/data/v9.2/$metadata#Microsoft.Dynamics.CRM.searchqueryResponse",
"response": "{\"Error\":null,\"Value\":[],\"Facets\":{},\"QueryContext\":null,\"Count\":0}"
}


Notes:

1-I have called the WhoAMI service and it returns Ok.

2-I've also confirmed that my entities/tables that I'm searching have the 'SyncToExternalSearchIndex' set to True by calling this API: api/data/v9.2/EntityDefinitions(LogicalName='MyCustomTableNameHere')?$select=CanEnableSyncToExternalSearchIndex,SyncToExternalSearchIndex
(based on this article: 
Search for Dataverse records (Microsoft Dataverse) - Power Apps | Microsoft Learn

I'm not sure what else I'm missing here. I appreciate the help. 

Thanks in advance. 

I have the same question (0)
  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    Hello,

    Did you try the Global Search in dataverse itself? Does it return the data you're looking for?

  • maxpower45255 Profile Picture
    223 on at

    @a33ik Yes. I thought I put that in the headline too 🙂

  • a33ik Profile Picture
    3,306 Most Valuable Professional on at

    I missed that. That's weird, to be honest, that it behaves this way. What do you use for queries run?

  • maxpower45255 Profile Picture
    223 on at

    I was able to get it to work with MSFT's help. The issue apparently is because I wasn't specifying the "searchColumns" property. If you don't specify columns, only the name column is searched by default. Here's a sample JSON payload that others can hopefully find useful.   

     

    {
    "search": "EAR PLUGS" ,
    "top": 10,
    "entities": "[{\"name\":\"xyz_entity1\",
    \"selectColumns\":[\"xyz_name\",\"xyz_itemnumber\",\"xyz_manufactureritemnumber\",\"xyz_itemdescription\"],
    \"SearchColumns\": [
    \"xyz_ItemNumber\", \"xyz_manufactureritemnumber\", \"xyz_itemdescription\", \"xyz_similaritem1\",
    \"xyz_similaritem2\"
    ]
    }]"
    }

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard