Skip to main content

Hi All,

I am using ADF web activity to refresh Tableau using rest api (PAT token based). I have multiple pipelines all of them ran except one with below error:

Failure type

User configuration issueDetails

<?xml version='1.0' encoding='UTF-8'?><tsResponse xmlns="http://tableau.com/api" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tableau.com/api https://help.tableau.com/samples/en-us/rest_api/ts-api_3_19.xsd"><error code="401002"><summary>Unauthorized Access</summary><detail>Invalid authentication credentials were provided.</detail></error></tsResponse>

 

When I manually ran the pipeline it ran successfully, PAT is not expired FYI. I don't know why it happened I want to avoid this issue in future. Below are some screenshots from Pipeline

 

Tableau Refresh using Rest API - ADF Web Activity

3 answers
  1. Jul 8, 2025, 1:47 PM

    @Deepak Kumar​ 

    The only thing that comes to my mind is that PAT cannot be used for concurrent sessions.

     

    @Deepak Kumar​ The only thing that comes to my mind is that PAT cannot be used for concurrent sessions.So, if you are using the same PAT to run two REST API methods (thus you generated two X-Tableau-Auth tokens), the newest authentication token will override the older session auth token resulting in the older session to be closed, and resulting in an Auth error.

     

    As a workaround, you may try generating only once a X-Tableau-Auth token, and then using it recursively or concurrently in your rest api methods.

     

    By default, according docs, the X-Tableau-Auth token will be good for 240 minutes:

    imagehttps://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_auth.htm

     

    If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.

     

    Regards,

     

    Diego Martinez

    Tableau Visionary and Forums Ambassador

0/9000