private IAuthenticationResult getAccessTokenByClientCredentialGrant(AzureCloudConfig azureCloudConfig)
      throws MalformedURLException, InterruptedException, ExecutionException {
    // If a proxy is required, properties must either be set at the jvm level,
    // or ClientSecretCredentialStorageClient should be used
    ConfidentialClientApplication app = ConfidentialClientApplication.builder(azureCloudConfig.azureStorageClientId,
        ClientCredentialFactory.createFromSecret(azureCloudConfig.azureStorageSecret))
        .authority(azureCloudConfig.azureStorageAuthority)
        .build();
    ClientCredentialParameters clientCredentialParam =
        ClientCredentialParameters.builder(Collections.singleton(azureCloudConfig.azureStorageScope)).build();
    return app.acquireToken(clientCredentialParam).get();
  }
Create {@link IAuthenticationResult} using the app details.
@param azureCloudConfig {@link AzureCloudConfig} object.
@return {@link IAuthenticationResult} containing the access token.
@throws MalformedURLException
@throws InterruptedException
@throws ExecutionException
ambry-cloud/src/main/java/com/github/ambry/cloud/azure/ADAuthBasedStorageClient.java