I am upgrading the version of the msgraph-sdk-java library in my project. I was using version 1.7.1 but I had some issues with setting conflict behavior when uploading files >4MB. I saw the issue was fixed in the latest version (see here) so I am trying to upgrade to version 2.3.0.
I updated my build.gradle file and noticed that now the interface IAuthenticationProvider is deprecated.
Provides authentication for a requests before it is sent by an HTTP provider.
@deprecated use ICoreAuthenticationProvider instead
It says I should use ICoreAuthenticationProvider instead but how do I build a new instance of GraphServiceClient without implementing the IAuthenticationProvider interface?
this.graphClient = GraphServiceClient.builder()
.authenticationProvider(appAuthProvider)
.buildClient();
Also, in the README of the library, it says we SHOULD use IAuthenticationProvider, which is even more confusing:
Just use whatever implementation you would have.
Whilst it is deprecated, it still works for now.
I imagine an update will allow the ICoreAuthenticationProvider to be used in the GraphServiceClient constructor, but that's not present yet.