msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

[Client bug]: Only HTTP/1.0 and HTTP/1.1 version requests are currently supported

Open herdma opened this issue 4 years ago • 3 comments

Describe the bug I am trying to create an app registration via the SDK but when running

await graphClient.Applications.Request().AddAsync(application);

I get the following Exception:

ArgumentException: Only HTTP/1.0 and HTTP/1.1 version requests are currently supported.

To Reproduce

  1. Created app registration with "Mobile and desktop applications" authentication
  2. Create new app registration via SDK using InteractiveBrowserCredential authentication

Expected behavior An app registration is created

Client version

  • Microsoft.Graph 4.20.0
  • Azure Identity 1.5.0
  • .NET 4.6.1

Desktop (please complete the following information):

  • OS: Windows 10

Additional context

// ...
var interactiveBrowserCredential = new InteractiveBrowserCredential(interactiveBrowserCredentialOptions);
var graphClient = new GraphServiceClient(interactiveBrowserCredential, scopes);
await graphClient.Applications.Request().AddAsync(application);

herdma avatar Mar 14 '22 11:03 herdma

Hey @herdma,

Thanks for raising this.

Any chance you can provide more information about your runtime? You provided .NET 4.6.1 but version Microsoft.Graph 4.20.0 targets a minimum version of 4.6.2 on .Net Framework

andrueastman avatar Mar 14 '22 12:03 andrueastman

Hey @andrueastman

Thanks, I created a new project with target framework .NET 4.6.2 and it works now. I chose 4.6.1 previously because the README mentions this:

The Microsoft Graph .NET Client Library targets .NetStandard 2.0 and .Net Framework 4.6.1.

herdma avatar Mar 14 '22 13:03 herdma

Thanks for pointing that out. That is an error in the Readme.

Created #1276 to resolve this.

andrueastman avatar Mar 14 '22 14:03 andrueastman