Closed klehmann closed 6 months ago
I downgraded to 6.2.1 as this version is mentioned in #1785 for a fix and also got the date/time issue. Has this ever been fixed?
Is there a way to set the HTTP header "Prefer: outlook.timezone" with the Java Graph API as a workaround to specify the timezone to use on server side?
private static final String OUTLOOK_TIMEZONE = "outlook.timezone=\"Europe\London\"";
Then use requestconfiguration headers in the call like below -
return graphClient.users().byUserId(meetingOwnerEmail).events().post(event, requestConfiguration -> { requestConfiguration.headers.add("Prefer", OUTLOOK_TIMEZONE); });
Does not help, I am still getting this wrong date/time format and conversion error. That's really weird. The Graph API Explorer returns datetime values ending with "Z", but the Java Graph AI gets a value without timezone.
@klehmann thanks for trying out this SDK. Might you be taking a direct dependency on microsoft-graph-core
or any microsoft-kiota
package as well?
From my tests the error deserialization works as expected.
@Ndiritu My dependencies look like this:
<dependencies>
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph</artifactId>
<version>6.7.0</version>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.12.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-abstractions</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-authentication-azure</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-http-okHttp</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-json</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-text</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-form</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.kiota</groupId>
<artifactId>microsoft-kiota-serialization-multipart</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
What should I use instead?
@klehmann
Keeping microsoft-graph
and azure-identity
is enough, so that you get the Kiota patch updates by default as you upgrade microsoft-graph
.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Expected behavior
Sites can be loaded without errors.
Actual behavior
Using Graph API 6.6.0 from Maven Central with Java 17, I get this error:
which seems to be identical to #1785 which got fixed in 6.2.1. Maybe this is a regression.
Steps to reproduce the behavior
Just playing around with the sample code and read the SiteCollectionResponse.