public String getAccessToken() {
    if (accessToken == null) {

      String token = "";
      try {
        token =
            TokenGenerator.GetTokenFromUrl(
                SdkConfig.acsUrl,
                this.getTenantContextId(),
                this.getAppPrincipalId(),
                SdkConfig.PROTOCOL_NAME + "://" + SdkConfig.protectedResourceHostName,
                this.getPassword());
      } catch (SdkException e) {
        e.getCause().printStackTrace();
        System.exit(1);
      }
      this.setAccessToken(token);
    }
    return accessToken;
  }