MSGraph connector SocketException

0
I have a connection with MSGraph in my application. When I get an OAuth token the first time, it goes well. But when I want to log in the next time I get the following exception: Exception occurred while processing request java.net.SocketException: Connection reset by peer: socket write error Only when I clear all cookies I can connect again. Does anyone have a clou what happens here...? Thanks!
asked
1 answers
1

We were experiencing the same issue, and found after a root-cause analysis that the problem exists because MsGraph uses asynchronous HTTP requests, whereas the MsGraphConnector tries to resolve the user with a regular HttpClient.

I solved this by digging into the custom java classes of the msgraphconnector.actions.custom package and replaced the HttpGet call in class GetHttpRequest with a CloseableHttpAsyncClient.

In order to do this you need to get the HttpAsyncClient from apache and install it into your Mendix project. You can find the java library and its documentation here: https://hc.apache.org/httpcomponents-asyncclient-ga/index.html.

 

 

 

 

answered