Loading

Tableau Cloud Connected App (Direct Trust) – REST API sign-in fails with 401001 "Error signing in to Tableau Server (16)" when the username is not the Cloud email address

Julkaisupäivä: Aug 11, 2026
Kuvaus

When authenticating to the Tableau Cloud REST API using a Connected App (Direct Trust) and a JSON Web Token (JWT), the sign-in request fails with a 401 UNAUTHORIZED and the following response body:

{"error":{"summary":"Signin Error","detail":"Error signing in to Tableau Server (16)","code":"401001"}}

This commonly occurs when an automation or integration that worked against Tableau Server is repointed at Tableau Cloud. The Connected App, client ID, secret ID, and secret value are all valid, but the sign-in still fails because the username being supplied (used as the JWT sub claim) is not a valid identity on the Tableau Cloud site.

The typical trigger: the integration sends an on-premise-style username (for example, an Active Directory short name such as DOMAIN\jsmith), which is a valid identity on Tableau Server but does not resolve to a user on Tableau Cloud, where every user is identified by their email address / TableauID.

Ratkaisu

Work through the following steps in order, stopping when the issue is resolved.

Step 1 — Use the user's Tableau Cloud email address as the sign-in username

On Tableau Cloud, the identity is the user's email address (TableauID), not the short/AD username used on Tableau Server. Supplying the wrong identity as the JWT sub produces the 401001 error.

  1. In your JWT / REST API sign-in request, set the username value (the JWT sub claim) to the user's email address exactly as it appears on the Tableau Cloud site, e.g. jsmith@example.com — not the short name such as DOMAIN\jsmith.
  2. Re-run the sign-in request. A valid session token should be returned.

Step 2 — Confirm the user exists on the target Cloud site with that email

The JWT only authenticates an existing user; it does not create one. If the email is not present on the site, the sign-in will still fail.

  1. As a site administrator, sign in to Tableau Cloud.
  2. Go to Users and confirm the exact email address is present on the site (and on the correct site if you administer more than one).
  3. Use that exact email as the username in the request.

Step 3 — Verify the Connected App and JWT are otherwise valid

If the identity is correct and sign-in still fails, confirm the remaining Connected App requirements.

  1. Confirm the Connected App is Enabled (Settings → Connected Apps — apps are Disabled by default when first created).
  2. Confirm the JWT header uses the correct kid (secret ID) and iss (client ID), and that the secret is still active (not expired or deleted).
  3. Confirm the JWT includes the required scp (scopes) claim for the REST API operations being performed, and aud set to tableau.
  4. Confirm the clock on the machine generating the JWT is set to UTC — if the clock is skewed, the JWT can be rejected as invalid/expired.

Reference: Tableau Help — Configure Connected Apps with Direct Trust

Knowledge-artikkelin numero

005390904

 
Ladataan
Salesforce Help | Article