code: public Future<AuthenticationResult> acquireToken(final String resource,
              final ClientCredential credential,
              final AuthenticationCallback callback) {
          this.validateInput(resource, credential, true);
          final ClientAuthentication clientAuth = new ClientSecretPost(
                  new ClientID(credential.getClientId()), new Secret(
                          credential.getClientSecret()));
          final AdalOAuthAuthorizationGrant authGrant = new AdalOAuthAuthorizationGrant(
                  new ClientCredentialsGrant(), resource);
          return this.acquireToken(authGrant, clientAuth, callback);
      }
docs: Acquires security token from the authority.
  
  @param resource
  Identifier of the target resource that is the recipient of the
  requested token.
  @param credential
  The client credential to use for token acquisition.
  @param callback
  optional callback object for non-blocking execution.
  @return A {@link Future} object representing the
  {@link AuthenticationResult} of the call. It contains Access
  Token and the Access Token's expiration time. Refresh Token
  property will be null for this overload.