SSL error downloading document contents from Graph API using Java SDK in Azure

Chris Braithwaite 1 Reputation point
2021-11-17T14:08:20.057+00:00

Hello,

My spring boot application deployed in Azure Spring Cloud is executing requests against the Graph API using the Java microsoft-graph SDK 3.2.0

All requests for sites, drives, driveitems are successful both locally on Windows 10 workstation and in Azure Spring Cloud container (JDK version 8 and 11)
but requests for driveitem contents specifically fail when executed in a deployed container due to "Caused by: java.io.EOFException: SSL peer shut down incorrectly".
The same code is able to retrieve the driveitem contents from my local Windows 10 workstation.

Our app is using TLS 1.2

The graphServiceClient object is a singleton.

Below are two attempts to retrieve document contents using the SDK - with the asynch the error occurs when getting the InputStream

// Async
CompletableFuture<InputStream> inputStreamFuture = graphServiceClient.
sites(siteId).
drives(driveId).
items(itemId).
content().
buildRequest().
getAsync();
inputStream = inputStreamFuture.get(TIMEOUT, TimeUnit.SECONDS);

// Sync
DriveItem driveItem = graphServiceClient.
sites(siteId).
drives(driveId).
items(itemId).
buildRequest().
get();

Any assistance or guidance with this issue is appreciated.

Thank you

Azure Spring Apps
Azure Spring Apps
An Azure platform as a service for running Spring Boot applications at cloud scale. Previously known as Azure Spring Cloud.
124 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Chris Braithwaite 1 Reputation point
    2021-11-29T06:25:05.307+00:00

    Issue was resolved.

    Finally identified that various other hosts were available in the firewall rules but Sharepoint is not.

    The connection refusal at the firewall was hidden by the SSL error message and was also not visible in application insights.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.