hi and happy new year!:champagne: im using python ...
# ask-a-descoper
r
hi and happy new year!🍾 im using python client to update a tenant and i only want to update a single custom attribute value. is there a way to do so without needing to re pass all exsiting values such as self provisiion domains, name etc? it also runs over other configuration unless set explicitly such as SSO
r
Hey Roei, i just tested and only these fields are affected (deleted) if not explictly sent in the update request:
Copy code
selfProvisioningDomains
  customAttributes
  enforceSSO
  enforceSSOExclusions
  federatedAppIds
other settings such as authType, "enabled" and moreover SSO other configurations (such as session management settings and authorization) are not being affected
so i would advise if you are worried about these fields, to get the tenant first and then make sure to update these fields
r
but it seems like the update method is not accepting these params
Copy code
enforceSSO
  enforceSSOExclusions
  federatedAppIds
how should i persist them?
r
first of all are you using these functionalities in your tenants? second, if needed, we can make sure to add those to the SDK so that it will correspond to the request body
r
yes i actually do need to persist these values. and i saw this example body already but it seems like the corresponding method in python client is not accepting these params
Copy code
def update(
        self,
        id: str,
        name: str,
        self_provisioning_domains: Optional[List[str]] = None,
        custom_attributes: Optional[dict] = None,
    ):
        """
        Update an existing tenant with the given name and domains. IMPORTANT: All parameters are used as overrides
        to the existing tenant. Empty fields will override populated fields. Use carefully.

        Args:
        id (str): The ID of the tenant to update.
        name (str): Updated tenant name
        self_provisioning_domains (List[str]): An optional list of domain that are associated with this tenant.
            Users authenticating from these domains will be associated with this tenant.
        custom_attributes (dict): Optional, set the different custom attributes values of the keys that were previously configured in Descope console app

        Raise:
        AuthException: raised if creation operation fails
        """
No kwargs as well🥲 am i missing something? should i not use the python client and just send http request?
r
i will add those to the SDK as params, but if you need it urgently you can use an http client
r
amazing thanks! do you have an ETA on when it will be released?
r
i will try to release it soon, in the next few days.
r
appreciate it thank you and have a nice weekend
r
you to! i see that enforce_sso is already part of the SDK what is missing is actually the enforce_sso_exclusions and federated_app_ids.