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
|`users`| An iterable of `UserItem` objects to add to the site. Each `UserItem` must have `name` set. |
4947
+
4948
+
**UserItem field notes**
4949
+
4950
+
*`name`**required**. If using Active Directory and the username isn’t unique across domains, include the domain-qualified form (for example `example\\Adam` or `adam@example.com`). ([Tableau Help][1])
4951
+
*`fullname` is used as the user’s display name (TSC reads the display name from `fullname`).
4952
+
*`email` optional, but if provided it must be a valid email address; it is included in the REST payload as `email`. ([Tableau Help][1])
4953
+
*`auth_setting` optional. If not provided and `idp_configuration_id` is `None`, the default is `ServerDefault`. (REST supports `authSetting` and `idpConfigurationId` as user creation attributes.) ([Tableau Help][1])
4954
+
*`site_role` optional. If not provided, defaults to `Unlicensed`.
4955
+
*`password` optional and only used when the server is using **local authentication**; do not provide a password for other auth types.
4956
+
* Admin level and publishing capability are inferred from `site_role`.
4957
+
* If the user belongs to a different IdP configuration, set `UserItem.idp_configuration_id` to that configuration’s ID. (REST supports `idpConfigurationId` when adding a user.) ([Tableau Help][1])
# If needed (Active Directory / non-unique names across domains), set the domain info
4980
+
for user in users:
4981
+
user.domain_name ="example.com"
4982
+
4983
+
job = server.users.bulk_add(users)
4984
+
```
4985
+
4986
+
[1]: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_users_and_groups.htm"Users and Groups Methods - Tableau"
4987
+
4988
+
4989
+
#### users.bulk_remove
4990
+
4991
+
```py
4992
+
users.bulk_remove(users)
4993
+
```
4994
+
4995
+
Remove multiple users from the current site in a single bulk operation. Users are identified by **domain** and **name** (not by user ID). This call is "fire-and-forget" in TSC: it does **not** return a `JobItem`, and it does not provide per-user results.
4996
+
4997
+
REST API: **Delete Users from Site with CSV** (`POST /sites/{site-id}/users/delete`). ([Tableau Help][1])
4998
+
4999
+
**Version**
5000
+
5001
+
This endpoint is available with REST API version **3.15** and up. ([Tableau Help][2])
0 commit comments