Skip to content

Commit d686ef6

Browse files
rubywermanruby-sf
andauthored
Update JWT Login Docs to include Unified Access Token, and and fix PAT table formatting (#1718)
* add UAT doc and fix PAT table formatting --------- Co-authored-by: Ruby Werman <ruby.werman@salesforce.com>
1 parent 95c5766 commit d686ef6

File tree

1 file changed

+27
-15
lines changed

1 file changed

+27
-15
lines changed

docs/sign-in-out.md

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,22 @@ In most cases this is the preferred method because it improves security by avoid
2323
To sign in to Tableau Server or Tableau Cloud with a personal access token, you'll need the following values:
2424

2525
**Tableau Server**
26-
Name | Description
27-
:--- | :---
28-
TOKEN_NAME | The personal access token name (from the My Account settings page)
29-
TOKEN_VALUE | The personal access token value (from the My Account settings page)
30-
SITENAME | The Tableau Server site you are authenticating with. For example in the site URL http://MyServer/#/site/MarketingTeam/projects, the site name is MarketingTeam. In the REST API documentation, this field is also referred to as contentUrl. This value can be omitted to connect with the Default site on the server.
31-
SERVER_URL | The Tableau Server you are authenticating with. If your server has SSL enabled, this should be an HTTPS link.
26+
27+
| Name | Description |
28+
| --- | --- |
29+
| TOKEN_NAME | The personal access token name (from the My Account settings page) |
30+
| TOKEN_VALUE | The personal access token value (from the My Account settings page) |
31+
| SITENAME | The Tableau Server site you are authenticating with. For example in the site URL http://MyServer/#/site/MarketingTeam/projects, the site name is MarketingTeam. In the REST API documentation, this field is also referred to as contentUrl. This value can be omitted to connect with the Default site on the server. |
32+
| SERVER_URL | The Tableau Server you are authenticating with. If your server has SSL enabled, this should be an HTTPS link. |
3233

3334
**Tableau Cloud**
34-
Name | Description
35-
:--- | :---
36-
TOKEN_NAME | The personal access token name (from the My Account settings page)
37-
TOKEN_VALUE | The personal access token value (from the My Account settings page)
38-
SITENAME | The Tableau Cloud site you are authenticating with. For example in the site URL https://10ay.online.tableau.com/#/site/umbrellacorp816664/workbooks, the site name is umbrellacorp816664. In the REST API documentation, this field is also referred to as contentUrl. This value is always required when connecting to Tableau Cloud.
39-
SERVER_URL | The Tableau Cloud instance you are authenticating with. In the example above the server URL would be https://10ay.online.tableau.com. This will always be an an HTTPS link.
35+
36+
| Name | Description |
37+
| --- | --- |
38+
| TOKEN_NAME | The personal access token name (from the My Account settings page) |
39+
| TOKEN_VALUE | The personal access token value (from the My Account settings page) |
40+
| SITENAME | The Tableau Cloud site you are authenticating with. For example in the site URL https://10ay.online.tableau.com/#/site/umbrellacorp816664/workbooks, the site name is umbrellacorp816664. In the REST API documentation, this field is also referred to as contentUrl. This value is always required when connecting to Tableau Cloud. |
41+
| SERVER_URL | The Tableau Cloud instance you are authenticating with. In the example above the server URL would be https://10ay.online.tableau.com. This will always be an an HTTPS link. |
4042

4143
This example illustrates using the above values to sign in with a personal access token, do some operations, and then sign out:
4244

@@ -82,27 +84,37 @@ server.auth.sign_out()
8284

8385
### Sign in with JSON Web Token (JWT)
8486

85-
If you have Connected Apps enabled, you can create JSON Web Tokens and use them to authenticate over the REST API. To learn about Connected Apps, read the docs on [Tableau Connected Apps](https://help.tableau.com/current/server/en-us/security_auth.htm#connected-apps)
87+
If you have Connected Apps enabled, you can create JSON Web Tokens and use them to authenticate over the REST API. To learn about Connected Apps, read the docs on [Tableau Connected Apps](https://help.tableau.com/current/server/en-us/security_auth.htm#connected-apps).
8688

8789
To sign in to Tableau Server or Tableau Cloud with a JWT, you'll need to have created a Connected App and generated the token locally (see [instructions to generate a JWT for your Connected App](https://help.tableau.com/current/server/en-us/connected_apps.htm#step-3-configure-the-jwt)):
8890

91+
Starting in December 2025 with REST API version 3.27, Tableau Cloud also accepts a Unified Access Token (UAT) as a JWT-based authentication mechanism. UATs are configured via the [Tableau Cloud Manager REST API](https://help.tableau.com/current/api/cloud-manager/en-us/reference/index.html#tag/Authentication-Methods/operation/createUatConfiguration).
92+
93+
To learn more about Unified Access Token, read the docs on [Unified Access Tokens](https://help.tableau.com/current/api/cloud-manager/en-us/docs/unified_access_tokens.html#sign-in-to-tableau-rest-api).
94+
8995
```py
9096
class JWTAuth(Credentials):
91-
def __init__(self, jwt=None, site_id=None, user_id_to_impersonate=None):
97+
def __init__(self, jwt, isUat=False, site_id=None, user_id_to_impersonate=None):
9298
```
9399

94100
Name | Description
95101
:--- | :---
96102
JWT | The generated token value
97103
SITENAME | The same as described for personal access tokens
98104
SERVER_URL | The same as described for personal access tokens
105+
isUat | (Tableau Cloud only) Set to `True` when authenticating with a Unified Access Token JWT. Leave it unset (or `False`) when signing in with a Connected App JWT.
99106

100107
This example illustrates using the above values to sign in with a JWT, do some operations, and then sign out:
101108

102109
```py
103110
import tableauserverclient as TSC
104111

105-
tableau_auth = TSC.JWTAuth('JWT', 'SITENAME')
112+
# Connected App JWT
113+
tableau_auth = TSC.JWTAuth(jwt='JWT', site_id='SITENAME')
114+
115+
# UAT JWT
116+
tableau_auth = TSC.JWTAuth(jwt='JWT', site_id='SITENAME', isUat=True)
117+
106118
server = TSC.Server('https://SERVER_URL', use_server_version=True)
107119
server.auth.sign_in(tableau_auth)
108120

0 commit comments

Comments
 (0)