code: def updateSecurityConfiguration(self,
                                      enableAutomaticAccountCreation=False,
                                      disableServicesDirectory=False
                                      ):
          
          url = self._url + "/config/update"
          params = {
              "f" : "json",
              "enableAutomaticAccountCreation": enableAutomaticAccountCreation,
              "disableServicesDirectory" : disableServicesDirectory
          }
          return self._post(url=url, param_dict=params,
                               securityHandler=self._securityHandler,
                               proxy_port=self._proxy_port,
                               proxy_url=self._proxy_url)
docs: This operation can be used to update the portal's security settings
          such as whether or not enterprise accounts are automatically
          registered as members of your ArcGIS organization the first time
          they accesses the portal.
          The security configuration is stored as a collection of properties
          in a JSON object. The following properties are supported:
             enableAutomaticAccountCreation
             disableServicesDirectory
          The automatic account creation flag (enableAutomaticAccountCreation)
          determines the behavior for unregistered enterprise accounts the
          first time they access the portal. When the value for this property
          is set to false, first time users are not automatically registered
          as members of your ArcGIS organization, and have the same access
          privileges as other nonmembers. For these accounts to sign in, an
          administrator must register the enterprise accounts using the
          Create User operation.
          The default value for the enableAutomaticAccountCreation property
          is false. When this value is set to true, portal will add
          enterprise accounts automatically as members of your ArcGIS
          organization.
          The disableServicesDirectory property controls whether the HTML
          pages of the services directory should be accessible to the users.
          The default value for this property is false, meaning the services
          directory HTML pages are accessible to everyone.