microsoftgraph / msgraph-sdk-serviceissues

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

Search within limited scope of AppRoot does not work #6

Open NLLAPPS opened 5 years ago

NLLAPPS commented 5 years ago

Hi, my app only requests AppFolder/Special App Root permission. Searching with full permission works fine.

For example:

https://graph.microsoft.com/v1.0/me/drive/root/microsoft.graph.search(q='test')

Finds the file. However,

https://graph.microsoft.com/v1.0/me/drive/special/approot/microsoft.graph.search(q='test')

Does not. It returns empty collection as below

{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(driveItem)", "value": [] }

Am I missing something? Here is my code

val searchCollection = graphServiceClient .me() .drive() .special("approot") .search(fileNameToDelete).buildRequest().get() val foundFiles = searchCollection.currentPage

NakulSabharwal commented 5 years ago

@NLLAPPS Thanks for reporting this issue. I am not able to repro this issue, I tried - https://graph.microsoft.com/v1.0/me/drive/special/approot/microsoft.graph.search(q='f1') https://graph.microsoft.com/v1.0/me/drive/root/microsoft.graph.search(q='f1') f1 being name of a file in my drive. These both queries are able to find my file. reference - https://docs.microsoft.com/en-us/graph/api/driveitem-search?view=graph-rest-1.0&tabs=cs

NLLAPPS commented 5 years ago

Are you sure you have removed permissions and used only "Files.ReadWrite.AppFolder", "User.Read" ?

Graph Explorer requests all permissions and search works fine if you request access to whole drive.

NakulSabharwal commented 5 years ago

@darrelmiller Can you point someone from OneDrive's search for this endpoint related query ?

petrhollayms commented 6 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.