I have .NET 6 console application and installed two Nuget packages
however following code does not work
the Microsoft.Graph.QueryOption
type could not be found, but it should be available in the Microsoft.Graph
package based on following documentation
https://learn.microsoft.com/en-us/dotnet/api/microsoft.graph.queryoption?view=graph-core-dotnet
any idea?
you might downgrade your graph package to v4.x.
That's because in V5.x SDK, QueryOption class is no longer used.
To pass query Options, the QueryOption class is no longer used. Query options are set using the requestConfiguration modifier as follows
var user = await graphServiceClient
.Users["{user-id}"]
.GetAsync(requestConfiguration => requestConfiguration.QueryParameters.Select = new string[] { "id", "createdDateTime"});