Skip to main content

Hi there,

 

I implemented a WDC which combines some queries from JSON Web APIs that are hosted in our intranet. As this was my first WDC, I made the mistake to stick to the Simulator for most of the development time and there it all worked well. But I met a problem when I later tried to use the WDC directly in the Tableau Desktop:

 

Network Error: 204 (Host requires authentication)

 

The message in the brackets is actually correct. The Web APIs require authentication scheme Kerberos or NTLM ("negotiate"). That's why I call the APIs something like this:

 

$.ajax({

   url: someUrl,

   dataType: "json",

   crossDomain: true,

   xhrFields: {

     withCredentials: true

  }, ...

 

This works alright in the Simulator in Chrome (even IE) but it throws the 204 error in the WDC browser in Tableau Desktop (10.4.3). I really couldn't find any similar issues in the Community or the www in general, that's why I'm asking here: Am I missing some configuration setting here or is the thing I'm trying not supported?

 

Kind Regards,

Marcel

5 件の回答
  1. 2018年4月16日 13:09

    Tableau Desktop is only able to call authentication that is within the WDC itself (as documented at https://tableau.github.io/webdataconnector/docs/wdc_authentication). Any authentication prior to the WDC cannot be called through Tableau Desktop.

    The reason of the difference observed when using the WDC Simulator (calls authentication pop-up) and Tableau Desktop (does not call authentication pop-up, and fails to connect) is that the simulator runs through a browser and has all the capabilities of the browser, including different approaches to authentication. Tableau Desktop itself has limited browser capabilities. The simulator is intended to be a tool to help with debugging WDC code, as opposed to a full replication of the WDC function.

     

    In order to be able to connect Tableau Desktop to a target using SSO via WDC, the best course of action would be to move the authentication into the WDC itself and ensure that no other authentication requests occur before Tableau Desktop connects to the WDC.

    If the above is not an option, please see k504866430 comment in https://github.com/tableau/webdataconnector/issues/160 . Basically Tableau can be programmed to capture the username, password and then construct the 'Authorization' header in javascript ajax request. for example:

     

    fetch(url, {

    method: 'GET',

    headers: {'Authorization' : btoa($('⌗username').value + ":" + $('⌗password').value)} });

     

    Should work.

0/9000