@@ -3043,6 +3043,48 @@ async def migrate_organization_guests(
30433043
30443044 self ._throw_on_error (res )
30453045
3046+ async def update_organization_login_methods (
3047+ self ,
3048+ * ,
3049+ organization_id : Optional [str ] = None ,
3050+ login_password_enabled : Optional [bool ] = None ,
3051+ login_oauth2_enabled : Optional [bool ] = None ,
3052+ login_magic_code_enabled : Optional [bool ] = None ,
3053+ login_saml_enabled : Optional [bool ] = None ,
3054+ ) -> Organization :
3055+ """
3056+ Set your Organization's allowed login methods.
3057+ :param organization_id: ID of the Organization.
3058+ :param login_password_enabled: Defines whether login with a password is enabled for the Organization.
3059+ :param login_oauth2_enabled: Defines whether login through OAuth2 is enabled for the Organization.
3060+ :param login_magic_code_enabled: Defines whether login with an authentication code is enabled for the Organization.
3061+ :param login_saml_enabled: Defines whether login through SAML is enabled for the Organization.
3062+ :return: :class:`Organization <Organization>`
3063+
3064+ Usage:
3065+ ::
3066+
3067+ result = await api.update_organization_login_methods()
3068+ """
3069+
3070+ param_organization_id = validate_path_param (
3071+ "organization_id" , organization_id or self .client .default_organization_id
3072+ )
3073+
3074+ res = self ._request (
3075+ "PATCH" ,
3076+ f"/iam/v1alpha1/organizations/{ param_organization_id } /login-methods" ,
3077+ params = {
3078+ "login_magic_code_enabled" : login_magic_code_enabled ,
3079+ "login_oauth2_enabled" : login_oauth2_enabled ,
3080+ "login_password_enabled" : login_password_enabled ,
3081+ "login_saml_enabled" : login_saml_enabled ,
3082+ },
3083+ )
3084+
3085+ self ._throw_on_error (res )
3086+ return unmarshal_Organization (res .json ())
3087+
30463088 async def get_organization_saml (
30473089 self ,
30483090 * ,
0 commit comments