@@ -17,6 +17,8 @@ def create(
1717 self_provisioning_domains : Optional [List [str ]] = None ,
1818 custom_attributes : Optional [dict ] = None ,
1919 enforce_sso : Optional [bool ] = False ,
20+ enforce_sso_exclusions : Optional [List [str ]] = None ,
21+ federated_app_ids : Optional [List [str ]] = None ,
2022 disabled : Optional [bool ] = False ,
2123 ) -> dict :
2224 """
@@ -30,6 +32,8 @@ def create(
3032 Users authenticating from these domains will be associated with this tenant.
3133 custom_attributes (dict): Optional, set the different custom attributes values of the keys that were previously configured in Descope console app
3234 enforce_sso (bool): Optional, login to the tenant is possible only using the configured sso
35+ enforce_sso_exclusions (List[str]): Optional, list of user IDs excluded from SSO enforcement
36+ federated_app_ids (List[str]): Optional, list of federated application IDs
3337 disabled (bool): Optional, login to the tenant will be disabled
3438
3539 Return value (dict):
@@ -51,6 +55,8 @@ def create(
5155 self_provisioning_domains ,
5256 custom_attributes ,
5357 enforce_sso ,
58+ enforce_sso_exclusions ,
59+ federated_app_ids ,
5460 disabled ,
5561 ),
5662 )
@@ -63,6 +69,8 @@ def update(
6369 self_provisioning_domains : Optional [List [str ]] = None ,
6470 custom_attributes : Optional [dict ] = None ,
6571 enforce_sso : Optional [bool ] = False ,
72+ enforce_sso_exclusions : Optional [List [str ]] = None ,
73+ federated_app_ids : Optional [List [str ]] = None ,
6674 disabled : Optional [bool ] = False ,
6775 ):
6876 """
@@ -76,6 +84,8 @@ def update(
7684 Users authenticating from these domains will be associated with this tenant.
7785 custom_attributes (dict): Optional, set the different custom attributes values of the keys that were previously configured in Descope console app
7886 enforce_sso (bool): Optional, login to the tenant is possible only using the configured sso
87+ enforce_sso_exclusions (List[str]): Optional, list of user IDs excluded from SSO enforcement
88+ federated_app_ids (List[str]): Optional, list of federated application IDs
7989 disabled (bool): Optional, login to the tenant will be disabled
8090
8191 Raise:
@@ -93,6 +103,8 @@ def update(
93103 self_provisioning_domains ,
94104 custom_attributes ,
95105 enforce_sso ,
106+ enforce_sso_exclusions ,
107+ federated_app_ids ,
96108 disabled ,
97109 ),
98110 )
@@ -115,6 +127,9 @@ def update_settings(
115127 inactivity_time_unit : Optional [SessionExpirationUnit ] = None ,
116128 JITDisabled : Optional [bool ] = None ,
117129 sso_setup_suite_settings : Optional [SSOSetupSuiteSettings ] = None ,
130+ enforce_sso : Optional [bool ] = None ,
131+ enforce_sso_exclusions : Optional [List [str ]] = None ,
132+ federated_app_ids : Optional [List [str ]] = None ,
118133 ):
119134 """
120135 Update an existing tenant's session settings.
@@ -136,6 +151,9 @@ def update_settings(
136151 inactivity_time_unit (Optional[SessionExpirationUnit]): Unit for inactivity timeout.
137152 JITDisabled (Optional[bool]): Whether JIT is disabled.
138153 sso_setup_suite_settings (Optional[SSOSetupSuiteSettings]): SSO Setup Suite configuration.
154+ enforce_sso (Optional[bool]): Whether to enforce SSO for the tenant.
155+ enforce_sso_exclusions (Optional[List[str]]): List of user IDs excluded from SSO enforcement.
156+ federated_app_ids (Optional[List[str]]): List of federated application IDs.
139157
140158 Raise:
141159 AuthException: raised if update operation fails
@@ -159,6 +177,9 @@ def update_settings(
159177 "ssoSetupSuiteSettings" : (
160178 sso_setup_suite_settings .to_dict () if sso_setup_suite_settings else None
161179 ),
180+ "enforceSSO" : enforce_sso ,
181+ "enforceSSOExclusions" : enforce_sso_exclusions ,
182+ "federatedAppIds" : federated_app_ids ,
162183 }
163184
164185 body = {k : v for k , v in body .items () if v is not None }
@@ -298,6 +319,8 @@ def _compose_create_update_body(
298319 self_provisioning_domains : List [str ],
299320 custom_attributes : Optional [dict ] = None ,
300321 enforce_sso : Optional [bool ] = False ,
322+ enforce_sso_exclusions : Optional [List [str ]] = None ,
323+ federated_app_ids : Optional [List [str ]] = None ,
301324 disabled : Optional [bool ] = False ,
302325 ) -> dict :
303326 body : dict [str , Any ] = {
@@ -309,4 +332,8 @@ def _compose_create_update_body(
309332 }
310333 if custom_attributes is not None :
311334 body ["customAttributes" ] = custom_attributes
335+ if enforce_sso_exclusions is not None :
336+ body ["enforceSSOExclusions" ] = enforce_sso_exclusions
337+ if federated_app_ids is not None :
338+ body ["federatedAppIds" ] = federated_app_ids
312339 return body
0 commit comments