0
votes

Your c# example for https://graph.microsoft.com/v1.0/me/people?$search="jesper"

GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var people = await graphClient.Me.People
.Request()
.Search("jesper")
.GetAsync();

Error I'm getting:

enter image description here

not sure if this is meant to happen but seems wrong that you cant use the search function https://developer.microsoft.com/en-us/graph/graph-explorer

1
Maybe you use functions from Microsoft.Graph.Beta instead of Microsoft.Graph? - Uwe Keim
just tried with graph beta and i get the same error :( - jesper jakobsen

1 Answers

0
votes

Yes, you're absolutely right. Those snippets are generated by a tool, and sometimes it gets it wrong. Thanks for reporting!

You can add any query parameters to requests sent by the SDK though, so you can still make this work like so:

var options = new List<QueryOption> { new QueryOption("$search", "j") };
var people = await graphClient.Me.People.Request(options).GetAsync();