Search code examples
htmljquerytableau-apivisual-web-developer

Auto Sign in to Tableau Server through Iframe


I am attempting embed a guest user's login to my Tableau Server's application. The embed code looks like the following. I know that I need some sort of jQuery that will pass a username and a password to the div, I am just not quite sure how to do that.

<script type='text/javascript' src='https://tableau.quantgov.org/javascripts/api/viz_v1.js'></script> 
<div class='tableauPlaceholder' style='width: 1000px; height: 827px;'>
  <object class='tableauViz' width='1000' height='827' style='display:none;'>
  <param name='host_url' value='https%3A%2F%2Ftableau.quantgov.org%2F' /> 
  <param name='embed_code_version' value='3' /> <param name='site_root' value='' />
  <param name='name' value='SignificantRulesTracker&#47;Dashboard1' />
  <param name='tabs' value='no' /><param name='toolbar' value='yes' />
  <param name='showAppBanner' value='false' />
  </object>
</div>

enter image description here

That embed code leads to a need for user authentication. Since I have no want to make the visualization private, I would like to embed credentials that auto-sign in anyone who uses the page and has cookies enabled. A few important notes, I already have the SAML authentication set up as well as the user. I also cannot use Tableau Public as I need some features from Tableau Server. The following page: quantgov.org/embed-test has a live example of this embed.


Solution

  • I wanted to follow up with this question after some time. Tableau makes what I was trying to do EXTREMELY difficult and I highly suggest that any small to medium size data shop that is looking to produce public facing data visualizations looks a different route than Tableau.

    After a good deal of digging and talking to support. Tableau Server is the only product in the Tableau family that provides the ability for SAML authentication that is embedded within visualizations. The catch is that specific feature is not available to an individual that only purchases a small amount of server keys. To make this happen, an organization needs to purchase an extremely high amount of keys. So in essence, the code was never really an issue here. It ended up being very unclear documentation on the Tableau side about the capabilities that come with certain purchased packages.