Issue on childCount not correct in search query

Nicolas Carvajal Chaves 0 Reputation points
2023-11-10T13:18:34.8933333+00:00

Describe the bug
When trying to search for a folder inside of an item in the OneDrive api, the folder -> childCount is always set to zero. But when the folder is accessed directly, the childCount is displayed correctly.

To Reproduce

  1. Make the following request in a folder with child folders which you know have childs:
    GET https://graph.microsoft.com/v1.0/me/drive/items/{{folder_id}}/search(q='{search_term}')
  2. See that the folder -> childCount property is set to 0 and copy the id of that folder
  3. Make the following request with the previous id:
    GET https://graph.microsoft.com/v1.0/me/drive/items/{{previous_folder_id}}
  4. folder -> childCount property is not 0

Expected behavior
The childCounts should be consistent

Screenshots
[image

](https://user-images.githubusercontent.com/66692533/277478256-acb3ecb2-3b94-48fe-8b67-58e4d491919b.png)

[image

](https://user-images.githubusercontent.com/66692533/277478016-626d5a39-c4a4-4a41-9428-1e463e9e2c09.png)

Notice that the folder with id '01RASYKTIE76MUOKLKWBA32BC77ZCMFK5G' has a childCount which is different in the 2 images.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Arc
  • Version 1.13.1 (42579)
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
9,104 questions
0 comments No comments
{count} votes