Skip to content

Commit cdc4816

Browse files
authored
Update API ref docs for adding idp_configuration_id to UserItem
2 parents 5ec5065 + 4e72dcd commit cdc4816

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

docs/api-ref.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,6 +3437,42 @@ Source file: models/site_item.py
34373437
<br>
34383438

34393439

3440+
### SiteAuthConfiguration class
3441+
3442+
The `SiteAuthConfiguration` class contains the attributes for the authentication configuration on Tableau Cloud. This class represents the authentication configuration information returned when using the `sites.list_authentication_configurations` method.
3443+
3444+
**Attributes**
3445+
3446+
Attribute | Description
3447+
:--- | :---
3448+
`auth_setting` | The authentication type (e.g., SAML, OpenID, TableauIDWithMFA).
3449+
`enabled` | Boolean value indicating whether the authentication configuration is enabled.
3450+
`idp_configuration_id` | The unique identifier for the authentication configuration.
3451+
`idp_configuration_name` | The name of the authentication configuration.
3452+
`known_provider_alias` | The provider name for the authentication method in case of OpenID configuration.
3453+
3454+
**Example**
3455+
3456+
```py
3457+
# import tableauserverclient as TSC
3458+
# server = TSC.Server('https://MY-SERVER')
3459+
# sign in, etc.
3460+
3461+
# Get authentication configurations for the current site
3462+
auth_configs = server.sites.list_authentication_configurations()
3463+
3464+
# Display configuration details
3465+
for config in auth_configs:
3466+
print(f"ID: {config.idp_configuration_id}")
3467+
print(f"Name: {config.idp_configuration_name}")
3468+
print(f"Type: {config.auth_setting}")
3469+
print(f"Enabled: {config.enabled}")
3470+
print(f"Provider: {config.known_provider_alias}")
3471+
```
3472+
3473+
<br>
3474+
<br>
3475+
34403476
### Site methods
34413477

34423478
The TSC library provides methods that operate on sites for Tableau Server and Tableau Cloud. These methods correspond to endpoints or methods for sites in the Tableau REST API.
@@ -3730,6 +3766,38 @@ server.sites.delete('9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d')
37303766
<br>
37313767
<br>
37323768

3769+
#### sites.list_authentication_configurations
3770+
3771+
```py
3772+
sites.list_authentication_configurations()
3773+
```
3774+
3775+
Lists the authentication configurations for the current site.
3776+
3777+
REST API: [List Authentication Configurations for the current Site](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_site.htm#list_authentication_configurations_site)
3778+
3779+
**Returns**
3780+
3781+
Returns a list of authentication configurations for the current site.
3782+
3783+
**Example**
3784+
3785+
```py
3786+
# import tableauserverclient as TSC
3787+
# server = TSC.Server('https://MY-SERVER')
3788+
# sign in, etc.
3789+
3790+
auth_configs = server.sites.list_authentication_configurations()
3791+
for config in auth_configs:
3792+
print(f"IDP Configuration ID: {config.idp_configuration_id}")
3793+
print(f"Name: {config.idp_configuration_name}")
3794+
print(f"Type: {config.auth_setting}")
3795+
print(f"Enabled: {config.enabled}")
3796+
```
3797+
3798+
<br>
3799+
<br>
3800+
37333801
---
37343802

37353803

@@ -4297,6 +4365,8 @@ Name | Description
42974365
`name` | The name of the user. This attribute is required when you are creating a `UserItem` instance.
42984366
`site_role` | The role the user has on the site. This attribute is required if you are creating a `UserItem` instance. See *User Roles* below for details.
42994367
`groups` | The groups that the user belongs to. You must run the populate_groups method to add the groups to the `UserItem`.
4368+
`idp_configuration_id` | Tableau Cloud only. The authentication method for the user. To find the idp_configuration_id value, use sites.list_authentication_configurations method. **Important: Use idp_configuration_id or auth_setting, but not both.**
4369+
43004370

43014371
**User Auth**
43024372

0 commit comments

Comments
 (0)