admin_sso_controller

The following methods allow for interaction with the ZPA Admin SSO Login Controller API endpoints.

Methods are accessible via zpa.admin_sso_controller

Copyright (c) 2023, Zscaler Inc.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class AdminSSOControllerAPI

Bases: APIClient

A Client object for the admin sso configuration controller resource.

get_sso_controller()

Fetches Admin SSO Login Details

Parameters:

N/A

Returns:

A tuple containing: - A dictionary with the SSO setting (e.g., {“ssologinonly”: True}) if the request succeeds, - The raw Response object, - Or an Exception if an error occurred.

Return type:

Tuple[dict, Response, Exception]

Examples

>>> fetched, _, err = client.zpa.admin_sso_controller.get_sso_controller()
>>> if err:
...     print(f"Error fetching updated SSO setting: {err}")
...     return
... print(f"Current SSO login-only setting: {fetched['ssologinonly']}")
update_sso_controller(**kwargs)

Update SSO Options

Parameters:

ssologinonly (bool) – Enable SSO Login Option

Returns:

A tuple containing: - An empty dictionary {} on success (due to 204 No Content), - The raw Response object, - Or an Exception if an error occurred.

The dictionary is always empty since the API returns no response body.

Return type:

Tuple[dict, Response, Exception]

Example

Enable SSO Login Option

>>> _, _, err = client.zpa.admin_sso_controller.update_sso_controller(
...     ssologinonly=True
... )
>>> if err:
...     print(f"Error updating SSO login option: {err}")
...     return
... print("SSO login-only setting updated successfully.")