Skip to content

Performing a /search/query including both driveItem and externalItems causes driveItems to not be retrieved correctly #2983

@catmanjan

Description

@catmanjan

Describe the bug

I have a search I am performing in graph explorer:

POST https://graph.microsoft.com/v1.0/search/query
{"requests":[{"sortProperties":null,"sortProperties":null,"contentSources":["/external/connections/IngressCMRecords","/external/connections/AzureFileShare1"],"enableTopResults":false,"entityTypes":["driveItem","externalItem"],"fields":["title","summary","fileExtension","path","shortcutURL","serverRedirectedURL","serverRedirectedPreviewURL","lastModifiedDateTime","createdBy","siteTitle","contentClass","parentLink","parentReference","isContainer","url","editUrl","ingressId","createdBy","icon","recordNumber","uri","subject","sender","webLink","hasAttachments","parentFolderId","modifiedDateTime","fileWebLink"],"from":0,"query":{"queryString":"*","queryTemplate":"{searchTerms} NOT(isContainer:true) NOT(title:__siteIcon__) NOT(fileExtension:url) NOT(fileExtension:lnk) NOT(fileExtension:xml) NOT(fileExtension:js) NOT(fileExtension:onetoc2) NOT(fileExtension:talf) NOT(fileExtension:tr5)"},"queryAlterationOptions":{"enableModification":true},"size":10}]}

This returns results, however driveItem results are missing most of their metadata, e.g. hitId is missing, parentReference etc - in fact all fields are blank except for fields nested deep under listItem.

If I remove the following:

"contentSources":["/external/connections/IngressCMRecords","/external/connections/AzureFileShare1"]

and "externalItem" out of the contentSources array, the results work as expected, all the properties are back.

This was working for a little over a year and stopped working recently (can't say exactly when)

Expected behavior

Properties work as before

How to reproduce

See above

SDK Version

latest

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions