Here is what I found. After deleting the parent item available to me, search for sharedWithMe as before, returning the item even if the parent list of items is empty.
Here is the code:
string sItemId = (this is the Id of the item shared with me); string sParentId = driveService.About.Get().Execute().RootFolderId; driveService.Parents.Delete(sItemId, sParentId).Execute(); var parentList = m_driveService.Parents.List(sItemId).Execute();
At this moment parentList.Items.Count is 0 .
Now when I search for sharedWithMe , the item is in the return list.
source share