As it is documented, using the Microsoft Graph REST API you can Search the hierarchy of items for items matching a query.
This works fine, as expected when we using API based approach using postman : https://{xxxxxx}-my.sharepoint.com/_api/v2.0/me/drive/root/search(q='Test')
Same functionality when we want to use Microsoft graph client, and it produces error.
Eg :
await graphClient.Me.Drive.Search(searchText).Request().GetAsync();
Error :
Code: -1, Microsoft.SharePoint.Client.ResourceNotFoundException Message: Cannot find resource for the request microsoft.graph.search.
Note : Same graphClient search call works properly for OneDrive for personal but not work for oneDrive for Business.