2 Replies Latest reply on Dec 5, 2017 6:55 AM by Hardik mehta

    Using Tableau javascript api and trusted authentication

    Hardik mehta

      Hi, I am new to Tableau. Visited few pages and tried several things before I thought to ask the experts.

       

      Some information -

      1) I am using tableau-2.1.2.min.js

      2) I have webserver/appserver named - testserver

      3) Tableau server - mytabserver

      4) View - /views/dios/dio

       

      Current code and behavior -

      Through my application UI page in browser if I use http://mytabserver/views/dios/dio - this works - meaning it prompts for user id and password. When correct information provided, it works fine and I see the tableau view on my page.

      Something like this, I am using in javascript - new tableau.Viz(containerDiv, 'http://mytabserver/views/dios/dio', ''); 

       

      What I am trying to achieve -

      All I want to do is remove the prompt. Meaning, when I access my application UI page, I do not want prompt for user id, password.

      I read online on - How Trusted Authentication Works - I thought this will work for me.

      So I changed following -

      1) Added testserver as trusted server in tableau server

      2) My application UI page calls REST service on testserver (which is written in Java) which calls http://mytabserver/trusted with userid to retrieve token - This works fine and I retrieve 2 part token.

      3) I send back token to UI which than calls - http://mytabserver/trusted/TOKEN/views/dios/dio - this throws error - could not locate unexpired ticket.

      I checked - http://kb.tableau.com/articles/issue/error-could-not-locate-unexpired-trusted-ticket and I don't think there is any proxy in between

       

      Is this how it should be used? Please suggest some pointer on how to achieve the results I am looking for. Any help is greatly appreciated.