0

Here is my build.gradle

dependencies {
    implementation 'com.azure:azure-identity:1.7.1'
    implementation 'com.microsoft.graph:microsoft-graph:5.42.0'
}

Here is my code (actual values are replaced with "...")

final ClientSecretCredential credential = new ClientSecretCredentialBuilder()
    .clientId("...")
    .clientSecret("...")
    .tenantId("...")
    .build();
final TokenCredentialAuthProvider authProvider = new TokenCredentialAuthProvider(
    List.of("files.readwrite.all"),
    credential
);
final GraphServiceClient client = GraphServiceClient
    .builder()
    .authenticationProvider(authProvider)
    .buildClient();

And once I run it I get a java.lang.ClassNotFoundException: com.azure.core.credential.TokenCredential

I tried to find a solution to this, but nothing seems to help.

Ole V.V.
  • 81,772
  • 15
  • 137
  • 161

0 Answers0