microsoftgraph / msgraph-sdk-serviceissues

Tracks service issues for follow up.
5 stars 0 forks source link

[Client bug]: search on drive fails #91

Open nowheremanmail opened 4 years ago

nowheremanmail commented 4 years ago

Describe the bug on onedrive, Trying to find all files with search criteria, it fails with error

Microsoft.Graph.ServiceException: 'Code: BadRequest Message: The type 'microsoft.graph.search' specified in the URI is neither a base type nor a sub-type of the previously-specified type 'microsoft.graph.driveItem'. Inner error: AdditionalData: request-id: 3c62bc2a-bd61-432e-926d-f372486b7e64 date: 2/26/2020 7:01:13 AM ClientRequestId: 3c62bc2a-bd61-432e-926d-f372486b7e64

To Reproduce

var search = provider.Graph.Me.Drive.Root.Search("music").Request().Top(20);

search.RequestUrl is "https://graph.microsoft.com:443/beta/me/drive/root/microsoft.graph.search(q='music')" it should be "https://graph.microsoft.com:443/beta/me/drive/root/search(q='music')" var files = await search.GetAsync();

Expected behavior should return first page with files

AB#7273

MIchaelMainer commented 4 years ago

This is an error in the service. I tried the following with a business account.

I can reproduce this issue with the beta endpoint. Success: https://graph.microsoft.com/beta/me/drive/root/search(q='music')?$top=20 Fail: https://graph.microsoft.com/beta/me/drive/root/microsoft.graph.search(q='music')?$top=20

This works as expected against the v1.0 endpoint. Success: https://graph.microsoft.com/v1.0/me/drive/root/search(q='music')?$top=20 Success: https://graph.microsoft.com/v1.0/me/drive/root/microsoft.graph.search(q='music')?$top=20

@ificator

sven5 commented 4 years ago

@MIchaelMainer Is there any workaround available?

petrhollayms commented 7 months ago

Thank you for reporting this issue. This appears to be an issue or limitation with the service APIs. Unfortunately, as the Microsoft Graph SDK team, we do not have ownership of the APIs that are causing you issues. We invite you to create a question about the service API to Microsoft Q&A and tagged with one of the [microsoft-graph-*] tags, that way it will get routed to the appropriate team for them to triage:

https://aka.ms/msgraphsupport or directly https://aka.ms/askgraph

For now, we will close the issue on our side but feel free to open it in the relevant repository if you think the issue is specific to SDK. Please let us know if this helps!

Note: We will close this repository on April 19, 2024.