Skip to content

Commit 78a97b8

Browse files
committed
Update API ref docs for adding idp_configuration_id and list authentication configurations
1 parent ff5c3c7 commit 78a97b8

1 file changed

Lines changed: 70 additions & 1 deletion

File tree

docs/api-ref.md

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,6 @@ The job properties are defined in the `JobItem` class. The class corresponds to
14201420
JobItem(id, type, created_at, started_at=None, completed_at=None, finish_code=0)
14211421

14221422
```
1423-
14241423
The `JobItem` class contains information about the specified job running on Tableau Server. The `JobItem` class defines the information you can query from Tableau Server. The class members correspond to the attributes of a server response payload.
14251424

14261425
Source file: models/job_item.py
@@ -3437,6 +3436,42 @@ Source file: models/site_item.py
34373436
<br>
34383437

34393438

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

34423477
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 +3765,38 @@ server.sites.delete('9a8b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d')
37303765
<br>
37313766
<br>
37323767

3768+
#### sites.list_authentication_configurations
3769+
3770+
```py
3771+
sites.list_authentication_configurations()
3772+
```
3773+
3774+
Lists the authentication configurations for the current site.
3775+
3776+
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)
3777+
3778+
**Returns**
3779+
3780+
Returns a list of authentication configurations for the current site.
3781+
3782+
**Example**
3783+
3784+
```py
3785+
# import tableauserverclient as TSC
3786+
# server = TSC.Server('https://MY-SERVER')
3787+
# sign in, etc.
3788+
3789+
auth_configs = server.sites.list_authentication_configurations()
3790+
for config in auth_configs:
3791+
print(f"IDP Configuration ID: {config.idp_configuration_id}")
3792+
print(f"Name: {config.idp_configuration_name}")
3793+
print(f"Type: {config.auth_setting}")
3794+
print(f"Enabled: {config.enabled}")
3795+
```
3796+
3797+
<br>
3798+
<br>
3799+
37333800
---
37343801

37353802

@@ -4297,6 +4364,8 @@ Name | Description
42974364
`name` | The name of the user. This attribute is required when you are creating a `UserItem` instance.
42984365
`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.
42994366
`groups` | The groups that the user belongs to. You must run the populate_groups method to add the groups to the `UserItem`.
4367+
`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.**
4368+
43004369

43014370
**User Auth**
43024371

0 commit comments

Comments
 (0)