title: How can I use tenant id, client id and client secret to connect to and manage directories and files in Azure Data Lake Storage Gen2?
body: <p>I want to upload files in azure blob storage gen2. But problem is not able to connect using tenant id, client id and client secret. I am referring Java code given in document <code>-&gt;</code> <a href="https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-java#upload-a-file-to-a-directory" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/storage/blobs/data-lake-storage-directory-file-acl-java#upload-a-file-to-a-directory</a>.</p>
  <pre><code>static public DataLakeServiceClient GetDataLakeServiceClient
      (String accountName, String clientId, String ClientSecret, String tenantID){
  
      String endpoint = &quot;https://&quot; + accountName + &quot;.dfs.core.windows.net&quot;;
          
      ClientSecretCredential clientSecretCredential = new ClientSecretCredentialBuilder()
      .clientId(clientId)
      .clientSecret(ClientSecret)
      .tenantId(tenantID)
      .build();
             
      DataLakeServiceClientBuilder builder = new DataLakeServiceClientBuilder();
      return builder.credential(clientSecretCredential).endpoint(endpoint).buildClient();
   }
  </code></pre>
  <p>But getting error for endpoint at last line of above code.</p>
  <p>From Postman:</p>
  <pre><code>URI http://localhost:8081/upload/
  Request param : &lt;file to be uploaded&gt;
  
  &quot;error&quot;: &quot;Internal Server Error&quot;,
  &quot;message&quot;: &quot;java.lang.NoClassDefFoundError: com/azure/core/implementation/util/ImplUtils&quot;
  </code></pre>