Creating Personal Access Tokens in Tableau Server/Cloud

by Erlina Cahyadi

In writing the documentation for some of my workflows using the Tableau Server REST API, I realized that there's not really any good instructions on how to create a Personal Access Tokens (PATs). The Tableau website does provides a lot of good information about PATs, but it does not provide a step-by-step on how to create one. While it's not difficult to create one, I thought it still would be helpful to share how to do it for those who've never created one before or are not as familiar with the Tableau Server/Cloud environment.

1. Click the profile icon located on the top right corner of Cloud and Server, and select “My Account Settings”

Note: each user’s profile icon may look different from the image displayed above.

2. Under the “Settings” tab, located on the far right, scroll down to the “Personal Access Tokens” section.

3. For any workflows utilizing the Tableau Server REST API, use “X-Tableau-Auth” for the PAT name and click “Create Token”.

Note: For other purposes, best practice is to use titles referring to the workflow or titles relevant to the intended use. PATs cannot share the same name as another PAT in a single user's profile. Also, users can only have a maximum of 10 PATs at the same time.

4. A pop-up will appear with the Token Name and Secret that will need to be used in the Alteryx workflow.

Note: Typically, a token will last a year and will need to be replaced after expiration. Also, once this pop-up is closed, the Secret token will no longer be accessible to regular users, except as a Site Admin on Tableau Cloud. Depending on the intention of use, users can either keep the Secret stored somewhere secure or create a new token if needed.

5. Insert the Token Names and Secrets in the first Text Input tool of the Alteryx workflow for the respective sites.

Note: Type in the URL and contentUrl for the intended site to connect to the API and users will be able to retrieve a different secret key through the initial authentication call to make further Tableau Server REST API calls. Refer to the API documentation for more information.

6. Clicking “Revoke Token” will delete the existing PAT.

Note: Workflows using revoked PAT(s) will run with errors and will not function properly.