3 Replies Latest reply on Mar 19, 2018 11:43 AM by Scott Hagemeyer

    Putting WDC Behind Login Page of Source System

    Scott Hagemeyer

      Hello,

       

      New to the Tableau world and taking a stab at my first web data connector. My apologies if this exists out here, as I tried searching and didn't find anything, but being new to the community I may not have known what I was looking at. If this has been answered, kindly link me to it and my apologies for missing it.

       

      The WDC I'm building needs to be behind the login page for the application from which the data will come, and that piece seems to be giving me fits. Here's the 10k foot view of the process:

      1. Launch Tableau
      2. Open WDC and provide the link as:  https://mysystem.company.com/login.aspx?requestURL=tableauWDC
      3. This opens my data source application's login page where I provide credentials to that source system
      4. Provided login is accepted, the application then routes me forward to my Tableau WDC page where I choose my data
      5. Send data back to Tableau to report on

       

      Where I'm getting stuck is that my WDC works fine in the Simulator, but within Tableau Desktop the query never finishes (and I've let it run for 24 hours to retrieve one test data row...). Scouring the logs, I can see that Tableau Desktop is getting all the way through my WDC calling the tableau.submit() function at the end. Looking at the logs still, I can see one line which doesn't make sense to me and maybe is where my problem lies? It looks like the last thing the WDC is doing is reloading itself, but without the ?requestUrl=tableauWDC URL parameter, which would result in just landing on a login page.

       

      Web view loading finished. Loading was successful. Loaded url is 'http://mysystem.company.com/login.aspx'

       

       

      If anyone has any ideas on how to put a WDC behind the source system's login page, I'd be very interested in this.

        • 1. Re: Putting WDC Behind Login Page of Source System
          Scott Hagemeyer

          Hello?  Bueller?  Anyone?

           

          *cricket chirp*

          • 2. Re: Putting WDC Behind Login Page of Source System
            Douglas Williams

            Hi Scott!

            I am building a similar WDC that uses a login procedure prior to data import as well. 

             

            It sounds like the issue you're having may not be related to the login if you're able to get things working correctly in the Simulator.  I had this experience as well but was able to troubleshoot through some of it.

             

            I'd suggest checking for the following:

            1) Ensure that you're passing any needed data correctly using tableau.connectionData

            2) Ensure that your column names contain only letters, numbers, or underscores (this is a big issue)

            3) Ensure that your data is in an array/JSON in data.appendRows() (not sure this is a big deal, but can't hurt to cover your bases).

             

            I'd also strongly suggest trying the built-in desktop debugger (PC only).  It helped me troubleshoot quite a bit. 

            Debugging in the Simulator and Tableau

             

            Hope this helps,

             

            Doug

            • 3. Re: Putting WDC Behind Login Page of Source System
              Scott Hagemeyer

              Doug,

               

              Thanks for the response. I've used these tools, but to no avail. The issue continues to be that while the simulator does not do this, the Tableau desktop software reloads the WDC page after it gets the initial schema. Because it's doing this and dropping the URL parameters in the process, it's being intercepted by the source application and stagnating at the login page. Looks to be a bug with how Tableau reloads the page, taking only the base URL and not the entire thing.

               

              I've worked around it by instead creating my own login page, which then uses REST API calls to the source application to login and proceed. This isn't nearly as graceful, and means I'm maintaining the same login page in two places, but at least it's functional.