KNOWLEDGE BASE

Error "401002: Unauthorized Access" When Running a tabcmd Command


Published: 28 Apr 2023
Last Modified Date: 28 Apr 2023

Issue

When running a command using tabcmd 2.0 (for example, using tabcmd export to export a PDF file), the following error may occur:

401002: Unauthorized Access
Invalid authentication credentials were provided.

Environment

  • Tableau Cloud
  • Tableau Server
  • tabcmd 2.0

Resolution

If you are using a TableauID username and password for authentication with Tableau Cloud, specify the full URL including the pod where the Tableau Cloud site is located in the URL used for the --server option (for example: https://prod-useast-b.online.tableau.com). 

If you are using a personal access token (PAT) for authentication, and you need to run multiple tabcmd commands concurrently, create multiple tokens for use with each of these tabcmd processes.

Cause

When logging in to Tableau Cloud using tabcmd 2.0, the server URL must include the pod for the Tableau Cloud site.

Additionally, when authenticating using a personal access token (PAT), there can only be one process using that token at a time. Other concurrent processes using the same token will fail with the "401002: Unauthorized Access" error.
Did this article resolve the issue?