Client API#

PyDPlus exposes a high-level client class along with convenience helpers from the top-level package.

PyDPlus Client#

class pydplus.PyDPlus(connection_info: dict | None = None, connection_type: str | None = None, tenant_name: str | None = None, base_url: str | None = None, base_admin_url: str | None = None, base_auth_url: str | None = None, env: str | None = None, private_key: str | None = None, legacy_access_id: str | None = None, legacy_key_material: str | None | Path | IDPlusLegacyKeyMaterial = None, oauth_client_id: str | None = None, oauth_private_key: str | None = None, oauth_private_key_jwk: dict | None | str = None, oauth_scope: str | None | tuple | list | set | frozenset = None, oauth_scope_preset: str | None | tuple | list | set | frozenset = None, verify_ssl: bool | None = None, auto_connect: bool = True, strict_mode: bool | None = None, env_variables: dict | None = None, helper: str | None | tuple | list | set | dict = None, oauth_api_type: str | None = None, oauth_issuer_url: str | None = None)[source]#

Bases: object

Class for the core client object.

Parameters:
  • connection_info (dict, None) – Dictionary that defines the connection info to use

  • connection_type (str, None) – Determines whether to leverage a(n) oauth (default) or legacy connection

  • base_url (str, None) –

    The base URL to leverage when performing Administration API calls

    Note

    This parameter is for backwards compatibility only and will eventually be fully deprecated. The base_admin_url should be leveraged instead as a best practice.

  • base_admin_url (str, None) – The base URL to leverage when performing Administration API calls

  • base_auth_url (str, None) – The base URL to leverage when performing Authentication API calls

  • tenant_name (str, None) –

    Specify the tenant name for the RSA ID Plus tenant (e.g. example-corporation)

    Note

    Specifying the tenant name will allow the base URLs to be defined if not already defined via argument, helper setting, or environment variable.

  • env (str, None) –

    Optionally specify the environment as PROD, DEV, or a custom name. (e.g. STAGING)

    Note

    This parameter will impact which environment variables are referenced when the client object is instantiated. (e.g. PYDPLUS_PROD_BASE_URL rather than PYDPLUS_BASE_URL)

  • private_key (str, None) – The file path to the private key used for legacy API authentication

  • legacy_access_id (str, None) – The Access ID associated with the Legacy API connection

  • legacy_key_material (str, pathlib.Path, pydplus.credentials.IDPlusLegacyKeyMaterial, None) – Legacy key material as a .key file path or parsed object

  • oauth_client_id (str, None) – The Client ID associated with the OAuth API connection

  • oauth_issuer_url (str, None) – The explicit OAuth issuer URL to use for token requests (e.g. https://<tenant>.auth.securid.com/oauth)

  • oauth_private_key (str, None) – The file path to the OAuth private-key JWK file used for Private Key JWT authentication

  • oauth_private_key_jwk (dict, str, None) – The OAuth private-key JWK payload used for Private Key JWT authentication

  • oauth_scope (str, tuple, list, set, frozenset, None) – One or more OAuth scopes to request in token requests (+-delimited string or iterable of scope strings)

  • oauth_scope_preset (str, tuple, list, set, frozenset, None) –

    One or more scope preset names to merge with explicit OAuth scopes

    Note

    Presets can also be provided through helper settings or environment variables. (e.g. all, user_read_only, etc.)

  • oauth_api_type (str, None) – Defines which API base URL should be used when inferring the OAuth issuer URL (auth by default; admin supported when configured)

  • verify_ssl (bool, None) – Determines if SSL connections should be verified (True by default)

  • auto_connect (bool) – Determines if an API connection should be established when the object is instantiated (True by default)

  • strict_mode (bool, None) – Determines if failed API responses should result in an exception being raised (False by default)

  • env_variables (dict, None) – Optionally define custom environment variable names to use instead of the default names

  • helper (str, tuple, list, set, dict, None) – Optionally provide the file path for a helper file used to define the object configuration

Returns:

The instantiated PyDPlus object

Raises:

TypeError, ValueError, pydplus.errors.exceptions.MissingRequiredDataError, pydplus.errors.exceptions.APIConnectionError

class User(pydp_object)[source]#

Bases: object

Class containing user-related methods.

disable_user(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Disable a user that is currently enabled.

Parameters:
  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

enable_user(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Enable a user that is currently disabled.

Parameters:
  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

get_user_details(email: str, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Retrieve the details for a specific user based on their email address.

Parameters:
  • email (str) – The email address of the user for whom to retrieve details

  • search_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The user details in JSON format or the API response as a requests object

Raises:

TypeError, errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

get_user_id(email: str | None = None, user_details: dict | None = None, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True) str[source]#

Retrieve the User ID associated with a specific user.

Parameters:
  • email (str, None) – The email address of the user for whom to retrieve details

  • user_details (dict, None) – The user details data from the pydplus.users.get_user_details() function

  • search_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)

  • timeout (int, str, None) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

Returns:

The User ID for the given user as a string (e.g. 54082ac6-4713-6368-2251-df813c41159f) or an empty string if the User ID could not be retrieved successfully

Raises:

TypeError, errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

mark_deleted(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Mark a specific user to be deleted during the next automated bulk deletion process.

Parameters:
  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

synchronize_user(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Synchronize the details of a user between an identity source and the Cloud Access Service.

Parameters:
  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

unmark_deleted(user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Unmark a specific user that was flagged to be deleted.

Parameters:
  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int, str, None) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

connect() Tuple[bool, dict[str, str]][source]#

Connect to the RSA ID Plus tenant using the Legacy API or OAuth method.

Returns:

Boolean value indicating if connection was established and dictionary with base API headers

Raises:

errors.exceptions.APIConnectionError, errors.exceptions.FeatureNotConfiguredError

get(endpoint: str, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a GET request against the ID Plus tenant.

Parameters:
  • endpoint (str) – The API endpoint to query

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIConnectionError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

patch(endpoint: str, payload: dict, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a PATCH call with payload against the ID Plus tenant.

Parameters:
  • endpoint (str) – The API endpoint to query

  • payload (dict) – The payload to leverage in the API call

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

post(endpoint: str, payload: dict, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a POST call with payload against the ID Plus tenant.

Parameters:
  • endpoint (str) – The API endpoint to query

  • payload (dict) – The payload to leverage in the API call

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

put(endpoint: str, payload: dict, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a PUT call with payload against the ID Plus tenant.

Parameters:
  • endpoint (str) – The API endpoint to query

  • payload (dict) – The payload to leverage in the API call

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIConnectionError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

refresh_oauth_token() dict[str, str][source]#

Force refresh the OAuth access token and return updated base headers.

Core Module#

Module:

pydplus.core

Synopsis:

This module performs the core operations of the package

Usage:

from pydplus import PyDPlus

Example:

pydp = PyDPlus()

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff (via GPT-5.3-codex)

Modified Date:

01 Apr 2026

pydplus.core.compile_connection_info(base_url: str | None = None, admin_base_url: str | None = None, private_key: str | None = None, legacy_access_id: str | None = None, oauth_client_id: str | None = None, oauth_private_key: str | None = None, oauth_private_key_jwk: dict | None | str = None, oauth_scope: str | None | tuple | list | set | frozenset = None, oauth_scope_preset: str | None | tuple[str] | list[str] | set[str] = None, auth_base_url: str | None = None, oauth_api_type: str | None = None, oauth_issuer_url: str | None = None) dict[source]#

Compile the connection_info dictionary to use when authenticating to the API.

Parameters:
  • base_url (str, None) – The base URL to leverage when performing API calls (deprecated and kept for backwards compatibility)

  • admin_base_url (str, None) – The base URL for the Administration API

  • private_key (str, None) – The file path to the private key used for legacy API authentication

  • legacy_access_id (str, None) – The Access ID associated with the Legacy API connection

  • oauth_client_id (str, None) – The Client ID associated with the OAuth API connection

  • oauth_private_key (str, None) – The file path to the OAuth private-key JWK used for Private Key JWT authentication

  • oauth_private_key_jwk (dict, str, None) – The OAuth private-key JWK payload used for Private Key JWT authentication

  • oauth_scope (str, tuple, list, set, frozenset, None) – One or more OAuth scopes to request in token requests (+-delimited string or iterable of scope strings)

  • oauth_scope_preset (str, tuple, list, set, None) – One or more presets representing groupings of OAuth scopes and permissions

  • auth_base_url (str, None) – The base URL for the Authentication API

  • oauth_api_type (str, None) – The API type to use when inferring OAuth issuer URL values (auth by default)

  • oauth_issuer_url (str, None) – The explicit OAuth issuer URL to use for token requests

Returns:

The compiled connection_info dictionary

Raises:

TypeError, ValueError

Additional Modules#

Module:

pydplus.api

Synopsis:

Defines the basic functions associated with the RSA ID Plus API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

30 Mar 2026

pydplus.api.api_call_with_payload(pydp_object, method: str, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform an API call with payload against the ID Plus tenant.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • method (str) – The API method (post, put, or patch)

  • endpoint (str) – The API endpoint to query

  • payload (dict, str, None) – The payload to leverage in the API call

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

pydplus.api.get(pydp_object, endpoint: str, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a GET request against the ID Plus tenant.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • endpoint (str) – The API endpoint to query

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

pydplus.api.patch(pydp_object, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a PATCH call with payload against the ID Plus tenant.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • endpoint (str) – The API endpoint to query

  • payload (dict, str, None) – The payload to leverage in the API call

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

pydplus.api.post(pydp_object, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a POST call with payload against the ID Plus tenant.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • endpoint (str) – The API endpoint to query

  • payload (dict, str, None) – The payload to leverage in the API call

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

pydplus.api.put(pydp_object, endpoint: str, payload: dict | None | str = None, params: dict | None = None, headers: dict | None = None, api_type: str = 'admin', timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Perform a PUT call with payload against the ID Plus tenant.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • endpoint (str) – The API endpoint to query

  • payload (dict, str, None) – The payload to leverage in the API call

  • params (dict, None) – The query parameters (where applicable)

  • headers (dict, None) – Specific API headers to use when performing the API call (beyond the base headers)

  • api_type (str) – Indicates if the admin (default) or auth API will be leveraged.

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

Module:

pydplus.auth

Synopsis:

This module performs the authentication and authorization operations

Usage:

from pydplus import auth

Example:

jwt_string = auth.get_legacy_jwt_string(base_url, connection_info)

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff (via GPT-5.5-codex)

Modified Date:

17 May 2026

pydplus.auth.get_legacy_headers(jwt_string: str | None = None, base_url: str | None = None, connection_info: dict | None = None) dict[str, str][source]#

Construct the headers to use in legacy API calls.

Parameters:
  • jwt_string (str, None) – The constructed JWT string to provide in the Authorization header

  • base_url (str, None) – The base URL for the Cloud Administration API

  • connection_info (dict, None) – Dictionary containing the connection information for the tenant

Returns:

The headers dictionary to utilize in legacy API calls

Raises:

TypeError, errors.exceptions.MissingRequiredDataError

pydplus.auth.get_legacy_jwt_string(base_url: str, connection_info: dict) str[source]#

Retrieve the JWT string used for Legacy API connections.

Parameters:
  • base_url (str) – The base URL for the Cloud Administration API

  • connection_info (dict) – Dictionary containing the connection information for the tenant

Returns:

The generated JWT string

Raises:

TypeError, errors.exceptions.MissingRequiredDataError

pydplus.auth.get_oauth_access_token(connection_info: dict, verify_ssl: bool = True, token_data: dict[str, Any] | None = None, force_refresh: bool = False, timeout: int = 30) dict[str, Any][source]#

Retrieve an OAuth access token and associated metadata.

Parameters:
  • connection_info (dict) – Dictionary containing the connection information for the tenant

  • verify_ssl (bool) – Determines if SSL certificates should be verified during token requests (True by default)

  • token_data (dict, None) – Existing OAuth token metadata to reuse when still valid

  • force_refresh (bool) – Forces an access-token refresh and bypasses the token cache (False by default)

  • timeout (int) – The timeout period in seconds to use for token endpoint requests (30 by default)

Returns:

OAuth token metadata containing token and expiration values

Raises:

TypeError, ValueError, errors.exceptions.APIConnectionError, errors.exceptions.FeatureNotConfiguredError, errors.exceptions.MissingRequiredDataError

pydplus.auth.get_oauth_headers(connection_info: dict, verify_ssl: bool = True, token_data: dict[str, Any] | None = None, force_refresh: bool = False, timeout: int = 30) Tuple[dict[str, str], dict[str, Any]][source]#

Construct OAuth headers for Administration API calls.

Parameters:
  • connection_info (dict) – Dictionary containing the connection information for the tenant

  • verify_ssl (bool) – Determines if SSL certificates should be verified during token requests (True by default)

  • token_data (dict, None) – Existing OAuth token metadata to reuse when still valid

  • force_refresh (bool) – Forces an access-token refresh and bypasses the token cache (False by default)

  • timeout (int) – The timeout period in seconds to use for token endpoint requests (30 by default)

Returns:

A tuple containing the headers dictionary and token metadata

Raises:

TypeError, ValueError, errors.exceptions.APIConnectionError, errors.exceptions.FeatureNotConfiguredError, errors.exceptions.MissingRequiredDataError

Module:

pydplus.constants

Synopsis:

Constants that are utilized throughout the package

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

01 Apr 2026

class pydplus.constants.ApiRequestTypes[source]#

Bases: object

Standard REST API Request types used by the package.

class pydplus.constants.ArgumentValues[source]#

Bases: object

Common argument values leveraged throughout the package.

class pydplus.constants.AuthFields[source]#

Bases: object

Fields relating to API authentication.

class pydplus.constants.AuthSchemes[source]#

Bases: object

Authentication schemes that are leveraged with the HTTP Authorization header. (Reference)

class pydplus.constants.AuthValues[source]#

Bases: object

Field/Parameter values relating to API authentication.

class pydplus.constants.ClientSettings[source]#

Bases: object

Fields, values, and other constants relating to the pydplus.PyDPlus client configuration settings.

class pydplus.constants.ConnectionInfo[source]#

Bases: object

Fields, values, and other constants relating to the connection_info dictionary within the client object and the pydplus.utils.helper module.

class pydplus.constants.ContentTypes[source]#

Bases: object

Common HTTP Content-Type header values used by the package.

This immutable namespace provides canonical MIME types used when sending or receiving data from the RSA REST API.

class pydplus.constants.CredentialValues[source]#

Bases: object

Constants used by secure credential parsing and private-key persistence helpers.

class pydplus.constants.EncodingTypes[source]#

Bases: object

Common HTTP Accept-Encoding header values. (Reference)

class pydplus.constants.EnvVariables[source]#

Bases: object

Constants relating to environment variable names.

Note

If values are updated in this class then the corresponding values should be updated in the pydplus.constants.HelperSettings class.

class pydplus.constants.ExceptionClasses[source]#

Bases: object

Constants utilized by the exception classes in the pydplus.errors.exceptions module.

class pydplus.constants.FileExtensions[source]#

Bases: object

Common file extensions leveraged throughout the package.

class pydplus.constants.Headers[source]#

Bases: object

Standard HTTP header names used by the package.

This immutable namespace centralizes common header keys to avoid magic strings throughout the codebase and to reduce the risk of typographical errors. These values are intended for constructing outbound HTTP requests to the RSA REST API.

class pydplus.constants.HelperSettings(VERIFY_SSL: str = 'verify_ssl')[source]#

Bases: object

Fields, values, and other constants relating to the helper configuration settings and

the pydplus.utils.helper module.

Note

If values are updated in this class for constants related to environment variables, then the corresponding values should be updated in the pydplus.constants.EnvVariables class.

class pydplus.constants.Languages[source]#

Bases: object

Common IETF language tags for use in the Accept-Language HTTP header.

Additional valid IETF language tags may be supplied manually when constructing request headers.

class pydplus.constants.LogMessages[source]#

Bases: object

Common log messages that are utilized in multiple locations throughout the package.

class pydplus.constants.OauthScopes[source]#

Bases: object

Constants representing the OAuth 2.0 permission scopes. (Reference)

class pydplus.constants.PayloadValues[source]#

Bases: object

Standard and common payload values used in RSA ID Plus REST API requests.

class pydplus.constants.QueryParams[source]#

Bases: object

Standard query and payload parameter names used in RSA ID Plus REST API requests.

This immutable namespace provides canonical parameter keys for constructing query strings when interacting with the RSA ID Plus REST API. Centralizing these values helps prevent typographical errors and ensures consistent request construction.

class pydplus.constants.ResponseKeys[source]#

Bases: object

Standard and common keys / fields for RSA ID Plus REST API responses.

class pydplus.constants.RestPaths[source]#

Bases: object

Template paths for RSA REST API endpoints.

This immutable namespace centralizes commonly used REST endpoint templates to avoid duplicating hard-coded paths throughout the codebase. The templates are designed to be formatted with runtime values such as user_id, timeout, and so forth.

class pydplus.constants.Urls[source]#

Bases: object

Common URLs leveraged throughout the package.

Module:

pydplus.decorators

Synopsis:

Decorators that can be used to include additional functionality with functions and methods

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

30 Mar 2026

pydplus.decorators.deprecated(*, since: str, replacement: str | None = None, removal: str | None = None, category: ~typing.Type[Warning] = <class 'DeprecationWarning'>, stacklevel: int = 2) Callable[[F], F][source]#

Mark a callable as deprecated and emits a warning at runtime.

Parameters:
  • since (str) – Version when deprecation started

  • replacement (str, None) – Suggested replacement usage (string)

  • removal (str, None) – Version when it will be removed (optional)

  • category (type[Warning]) – Warning category (default: DeprecationWarning)

  • stacklevel (int) – Warning stacklevel (default: 2)

Module:

pydplus.users

Synopsis:

Defines the user-related functions associated with the RSA ID Plus API

Created By:

Jeff Shurtliff

Last Modified:

Jeff Shurtliff

Modified Date:

30 Mar 2026

pydplus.users.disable_user(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Disable a user that is currently enabled.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

pydplus.users.enable_user(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Enable a user that is currently disabled.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

pydplus.users.get_user_details(pydp_object, email: str, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Retrieve the details for a specific user based on their email address.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • email (str) – The email address of the user for whom to retrieve details

  • search_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The user details in JSON format or the API response as a requests object

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError

pydplus.users.get_user_id(pydp_object, email: str = None, user_details: dict | None = None, search_unsynced: bool | None = None, timeout: int = 30, show_full_error: bool = True) str[source]#

Retrieve the User ID associated with a specific user.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • email (str, None) – The email address of the user for whom to retrieve details

  • user_details (dict, None) – The user details data from the pydplus.users.get_user_details() function

  • search_unsynced (bool, None) – Indicates if the user search should include unsynchronized users (optional)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

Returns:

The User ID for the given user as a string (e.g. 54082ac6-4713-6368-2251-df813c41159f) or an empty string if the User ID could not be retrieved successfully

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

pydplus.users.mark_deleted(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Mark a specific user to be deleted during the next automated bulk deletion process.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

pydplus.users.synchronize_user(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Synchronize the details of a user between an identity source and the Cloud Access Service.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError

pydplus.users.unmark_deleted(pydp_object, user_id: str, timeout: int = 30, show_full_error: bool = True, return_json: bool = True, allow_failed_response: bool | None = None)[source]#

Unmark a specific user that was flagged to be deleted.

Parameters:
  • pydp_object (class[pydplus.PyDPlus]) – The instantiated pydplus object

  • user_id (str) – The ID of an existing user (e.g. 54082ac6-4713-6368-2251-df813c41159f)

  • timeout (int) – The timeout period in seconds (defaults to 30)

  • show_full_error (bool) – Determines if the full error message should be displayed (defaults to True)

  • return_json (bool) – Determines if the response should be returned in JSON format (defaults to True)

  • allow_failed_response (bool, None) – Indicates that failed responses should return and should not raise an exception (If not explicitly defined then True if Strict Mode is disabled)

Returns:

The API response in JSON format or as a requests object

Raises:

TypeError, errors.exceptions.APIMethodError, errors.exceptions.APIRequestError, errors.exceptions.APIResponseConversionError, errors.exceptions.InvalidFieldError, errors.exceptions.MissingRequiredDataError