$search query parameter is not returning all results

Nylas Inc 5 Reputation points
2024-10-15T09:36:59.92+00:00

Hi folks,

We are not getting consistent results when using the $search query parameter on Graph messages. When we search with from and to properties (https://graph.microsoft.com/v1.0/me/messages?$search="to:testtaxdome0.staging@gmail.com+AND+from:alex@outlook.com"&$top=20) we don't get all results.

But when we search only with to property and manually filter from values (https://graph.microsoft.com/v1.0/me/messages?$search="to:testtaxdome0.staging@gmail.com"&$top=20) we get a lot more results.

Thanks for your help!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,140 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yakun Huang-MSFT 5,490 Reputation points Microsoft Vendor
    2024-10-16T02:03:33.7233333+00:00

    Hello Kasun Bandara,

    Thank you for reaching out to Microsoft Support!

    You have two different requests with different recipient addresses, one for test.staging@gmail.com and the other for testtaxdome0.staging@gmail.com. If so, inconsistent query results are the expected behavior.

    See the documentation for more information about the $search query parameters:

    https://zcusa.951200.xyz/en-us/graph/search-query-parameter?tabs=http

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


  2. Nylas Inc 5 Reputation points
    2024-10-16T16:28:55.7233333+00:00

    @Yakun Huang-MSFT thanks for responding. Sorry for my misspelling error, the recipient addresses should be the same. So testtaxdome0.staging@gmail.com for both.

    We still get different results.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.