This is working on 1.17
var accessToken="xxxx";
var graphClient = new GraphServiceClient(null);
var user = await graphClient.Me.Request(new List<HeaderOption>()
{
new HeaderOption("Authorization", "Bearer " + accessToken)
}).GetAsync();
Breaking change 1 on 1.20
var graphClient = new GraphServiceClient(null); // NullException being thrown
Breaking change 2 on 1.20
var accessToken="xxxx";
var graphClient = new GraphServiceClient(new HttpClient());
var user = await graphClient.Me.Request(new List<HeaderOption>()
{
new HeaderOption("Authorization", "Bearer " + accessToken)
}).GetAsync();// Authentication provider is required before sending a request.
First of all, why breaking change on minor update?
Why make authentication provider required? It was good, I put the access token to the request anyway but now i get this error
Status Code: 0
Microsoft.Graph.ServiceException: Code: invalidRequest
Message: Authentication provider is required before sending a request.