You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf707f0
Browse filesBrowse the repository at this point in the historyBrowse files
Fix the populate_excel example and the user domain_name docs (#1911)
* Fix the populate_excel example and the user domain_name docs
view_item.excel is a generator, so join its chunks before writing. domain_name
is read-only and its meaning differs between Tableau Server and Tableau Cloud;
the bulk_add example now uses the domain-qualified name instead of setting it.
Co-Authored-By: Claude Code <noreply@anthropic.com>
* Note where the domain ends up for users created from a CSV file
Co-Authored-By: Claude Code <noreply@anthropic.com>
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/api-ref.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8088,7 +8088,7 @@ The `UserItem` class contains the members or attributes for the view resources o
8088
8088
Name | Description
8089
8089
:--- | :---
8090
8090
`auth_setting` | This is a required attribute and is only for Tableau Cloud. The new authentication type for the user - see **User Auth** below for values.
8091
-
`domain_name` | The name of the site.
8091
+
`domain_name` | On Tableau Server, the domain of the user: the name of the Active Directory domain, or `local` if the user uses local authentication. On Tableau Cloud, the authentication type of the user. `users.get` and `users.get_by_id` populate it. It is read-only, so a `UserItem` that you create yourself has no domain; include the domain in the `name` instead.
8092
8092
`external_auth_user_id` | Represents ID stored in Tableau's single sign-on (SSO) system. The `externalAuthUserId` value is returned for Tableau Cloud. For other server configurations, this field contains null.
8093
8093
`id` | The id of the user on the site.
8094
8094
`last_login` | The date and time the user last logged in.
@@ -8239,16 +8239,14 @@ import tableauserverclient as TSC
8239
8239
server =TSC.Server("http://localhost")
8240
8240
# Sign in to the server
8241
8241
8242
+
# If needed (Active Directory / non-unique names across domains), use the domain-qualified
8243
+
# form of the name. `domain_name` is read-only, so it cannot be set on a UserItem.
|`users`| An iterable of `UserItem` objects to remove from the site. Each `UserItem` should have `name` and `domain_name` set. |
8273
+
|`users`| An iterable of `UserItem` objects to remove from the site. Each `UserItem` should have `name` and `domain_name` set, as items returned by `users.get` or `users.filter` do. |
8276
8274
8277
8275
**UserItem field notes**
8278
8276
@@ -8678,6 +8676,8 @@ Adds users from a CSV file to the site. The CSV file format matches the format u
8678
8676
The CSV file should have the following column format (header row optional):
The whole `Username` value becomes the `name` of the `UserItem`, and `domain_name` is not set. To add a user from an Active Directory domain, include the domain in the username (for example `example\Adam`).
Populates the Excel content of the specified view.
9094
9094
9095
-
After calling this method, the Excel data is available through the view's `excel` property.
9095
+
After calling this method, the Excel data is available through the view's `excel` property. The property is a generator that yields the file in chunks, so join the chunks with `b''.join(view_item.excel)` to get the file content as bytes.
0 commit comments