Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:00:59+00:00 2026-06-07T03:00:59+00:00

I see there aren’t many Tableau experts floating around StackOverflow, but perhaps someone out

  • 0

I see there aren’t many Tableau experts floating around StackOverflow, but perhaps someone out there has had this problem before, and knows the solution. I’m a total noob at Tableau, so please forgive me if this question is inane. Thanks in advance!

The System

The way we have Tableau set up is on an server separate from the webserver. The application is written in PHP, using CakePHP 2.2.0 stable.

10.0.0.10 - webserver
10.0.0.11 - tableau

In order to have a client view a report generated by Tableau, we are using the trusted authentication ticketing system, where the client is issued a URL with a specific ticket. The client then uses this ticket to ask the tableau server directly for the report.

An example:

  1. Client GETS http://example.com/reports/view/3 – which is 10.0.0.10 internally.
  2. Server POSTS to 10.0.0.11, and asks for a ticket for the client to view report 3
  3. Tableau Server responds to the post with a number, e.g. 987654321.
  4. Server responds to the client’s GET with the page, including the ticket.
  5. Client GETS http://tableau.example.com/trusted/987654321/view3
  6. Tableau server verifies the client IP against the ticket, and responds with the HTML for the report.

The Issue

The problem is this: When the code asks for the tableau ticket number (steps 2 & 3 above), the Tableau server responds with an authentication page, not a ticket ID. If I comment out the “target_site” parameter in the $postdata array, tableau does not respond with a login page and instead simply says “-1”.

The PHP code to generate the trusted URL:

<?php
public function get_trusted_url($view = 'book2sheet1') {
    $email = $this->Auth->user();
    $email = $email['Email']; //This email is registered as a Tableau user!

    $postdata = http_build_query(
        array(
            'username' => $email,
            'target_site' => 'oursite', //If I comment this line out, Tableau no longer returns an auth page and instead simply returns "-1"
            'client_ip' => $_SERVER['REMOTE_ADDR']
        )
    );

    $opts = array('http' =>
        array(
            'method'  => 'POST',
            'header'  => 'Content-type: application/x-www-form-urlencoded',
            'content' => $postdata
        )
    );

    $context = stream_context_create($opts);

    $ticket = file_get_contents('http://10.0.0.11/trusted/', false, $context);
    if($ticket > 0) {
        return 'http://tableau.example.com/t/rg/trusted/' . $ticket . '/' .$view . '?:embed=yes&:comments=no&:toolbar=yes';
    } else {
        echo 'failure'; //debug
        print_r($ticket); //debug - this prints out the auth page
        return false;
    }
}

Any help would be greatly appreciated! As I mentioned, I’m a total noob at Tableau 🙂

Image of the returned login html, dumped to the page using print_r('ticket')

tableau auth login page dump

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T03:01:00+00:00Added an answer on June 7, 2026 at 3:01 am

    The first thing I would do is make sure that Trusted Ticketing is working in a vacuum. This link http://ttrequest.notlong.com  
    will land you in a folder which contains a simple HTML/JavaScript page you can use to make sure everything is configured correctly. Then, look more closely at your code.

    Providing a value for target_site (even a zero length string) is necessary as it tells us which Tableau site you’re requesting a ticket for. Blank/zero length string = “Default site”, essentially.

    I know very little PHP, but Tableau provides some sample code which I’ve used in the past. It doesn’t use file_get_contents() to do the POST, but instead leans on http_parse_message()…and it works for me:

     Function get_trusted_ticket_direct($server, $user, $targetsite) {
    
      $remote_addr = $_SERVER['REMOTE+ADDR'];  
      $params = array(
        'username' => $user,
        'client_ip' => $remote_addr,
        'target_site' => $targetsite
          );
    
        $ticket= http_parse_message(http_post_fields("http://$server/trusted", $params))->body;
    
      if ($ticket > 0) {
         return $ticket;
      }
      else
        return 0;
    } 
    

    I honestly don’t know if file_get_contents() is seen as a ‘better’ approach than http_parse_message() in the PHP community (maybe someone can comment on this), but the sample code is solid except for the fact that it still doesn’t include a reference to the target_site parameter (as it was written way before Tableau had multi-tenancy).

    The sample code can be found in C:\Program Files (x86)\Tableau\Tableau Server\7.0\extras\embedding\php

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I see there is a question here but there is no definite answer. Has
I see there are techniques available to have deep models in Backbone, but how
I see there is version 1.5 and 3.0 beta , but I can't seem
I see there are BN_CLICKED and BN_DBLCLK notification messages for a button control. but
I see there is a API call for Frienships/Show, but I am not sure
I see there is full ajax mode but I wanted to see if there
I see there is an extension for Ninject integration with asp.net-mvc but it looks
I see there are plenty of web sites out there that will do this,
I am trying to parse this page , but there aren't much unique info
The problem is to figure out if there aren't any duplicate characters in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.