microsoftgraph / msgraph-sdk-dotnet

Microsoft Graph Client Library for .NET!
https://graph.microsoft.com
Other
674 stars 243 forks source link

Application using Microsoft.Graph.dll works on Windows 10 but doesn't work on Server 2019 #2567

Open LauranceOrLaurent opened 1 week ago

LauranceOrLaurent commented 1 week ago

So:

The remaining component therefore seems to be between Server 2019 and the dotnet MS.Graph.dll library(s). Something on the Server prevents the work of MS.Graph.dll's

andrueastman commented 1 week ago

Thanks for raising this @LauranceOrLaurent

Are you able to share the following to help us understand the issue better?

LauranceOrLaurent commented 1 week ago

logs of the errors reported of the client

The call is like this: deltaEvents = await GraphServiceClient.Users[userMailAddress].Calendar.Events.Delta.GetAsync(delegate (RequestConfiguration requestConfiguration) { requestConfiguration.QueryParameters.StartDateTime = DateTime.Now.AddYears(30).ToString("s"); });_

_deltaEvents = null on Server 2019, _deltaEvents is ok filled in Windows 10

version of the Graph SDK being used(does this error happen with the latest version)

sample code of how you are intializing the GraphClient

Tested on two different server 2019. So the problem ist not related to a specific server installation.

LauranceOrLaurent commented 4 days ago

Any Idea?

andrueastman commented 3 days ago

I'm not sure what could be wrong here. Any chance you can try adding a responseHandler option to the request as shown in the example here to get the raw native response object?

https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/docs/upgrade-to-v5.md#native-response-object

I would then try to log the properties(headers, status code and content values) of the response object to see if indeed the API is returning a meaningful response here to isolate where the problem could be.

LauranceOrLaurent commented 3 days ago

I did that with: https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/docs/upgrade-to-v5.md#native-response-object

As I described before: The Response is also still NULL after 1 minute. No exceptions. Looks like MSGraph.dll can not work/send on Server 2019.

Did you try this on Server 2019 and it worked?