def createUser(self,
                   username,
                   password,
                   firstName,
                   lastName,
                   email,
                   role="org_user",
                   provider="arcgis",
                   description="",
                   idpUsername=None):
        """
        This operation is used to create a new user account in the portal.
        Inputs:
           username - The name of the user account.
           password - The password for the account. This is a required
                      parameter only if the provider is arcgis; otherwise,
                      the password parameter is ignored.
           firstName - first name of the user account
           lastName - last name of the user account
           email - The email address for the user account.
           description - An optional description string for the user
                         account.
           role - The role for the user account. The default value is
                  org_user.
                  Values: org_user | org_publisher | org_admin
           provider - The provider for the account. The default value is
                      arcgis.
                      Values: arcgis | webadaptor | enterprise
           idpUsername - name of the user on the domain controller.
                         Ex: domain\account
        """
        url = self._url + "/users/createUser"
        params = {
            "f" : "json",
            "username" : username,
            "password" : password,
            "firstname" : firstName,
            "lastname" : lastName,
            "email" : email,
            "role" : role,
            "provider" : provider,
            "description" : description
        }
        if idpUsername is None:
            params['idpUsername'] = idpUsername
        return self._post(url=url,
                          param_dict=params,
                          securityHandler=self._securityHandler,
                          proxy_port=self._proxy_port,
                          proxy_url=self._proxy_url)