3 Replies Latest reply on Jun 25, 2019 3:06 PM by Geraldine Zanolli

    Embedding multiple dashboards using JavaScript API


      I am trying to embed multiple dashboards into a web page following this instruction: Tableau JavaScript API - Tableau

      I replaced the 3rd step by

      function initViz() {
         var containerDiv1 = document.getElementById("vizContainer1");
         var containerDiv2 = document.getElementById("vizContainer2");
         var url1 = "https://YOUR-SERVER/views/YOUR-VISUALIZATION-1";
         var url2 = "https://YOUR-SERVER/views/YOUR-VISUALIZATION-2";

         var viz1 = new tableau.Viz(containerDiv1, url1);
         var viz2 = new tableau.Viz(containerDiv2, url2);

      but only one viz will load and the other fail with the message "forbidden action - you are not authorized to perform this action" whenever I load the page without previously being logged into Tableau Server. After reloading the page or previously logging into Tableau Server, everything is fine.


      In the debugging console, I get a 403 status code, if this is of any relevance.


      I tried different login methods such as Single Sign-On, username / password, and even trusted authentication - still the same result.


      Any ideas what I might be doing wrong?