Skip to main content

Calling LogOnWithWindowsAuthentication2 using JSON

Article # 3035204 - Page views: 114


This article describes how to call LogOnWithWindowsAuthentication2 using JSON


Calling UserService 
Method: LogOnWithPassword2()
  • Create a html file using the below code
  • Host the file in web server using the path where the HTML file resides e.g. C:\inetpub\wwwroot\
  • Browse the html file and it will invoke Calling LogOnWithWindowsAuthentication2 in UserService
  • Change logonJSON.unconditionalLogOn to true/false depending on requirements
        <script src=""></script>
    <div id="Request"></div>
    <div id="Result"></div>
        var LogOnWithWindowsAuthentication2struct = function () {
            var struct = {
                    "logOnProtocol": "",                    
                    "unconditionalLogOn": false,
            return struct;
        var logonJSON = new LogOnWithWindowsAuthentication2struct();
        logonJSON.logOnProtocol = "7";
        logonJSON.unconditionalLogOn =  true;
        $("#Request").html("<BR/><B>Request:</B><BR/>" + JSON.stringify(logonJSON));
                // Calling method LogOnWithWindowsAuthentication2
            type: "POST",
            async: "false",
            url: "http://localhost/TotalAgility/Servic...uthentication2",
            data: JSON.stringify(logonJSON),            
            contentType: "application/json; charset=utf-8",
            crossDomain: true,
            dataType: "json",
            success: function (result) {
                $("#Result").html("<BR/><B>Response: </B><BR/>" + JSON.stringify(result.d));
            error: function (jqXHR, textStatus, errorThrown) {
                alert("***Error***\n" +  errorThrown + "\n" + textStatus);

Level of Complexity 


Applies to  

Product Version Build Environment Hardware
Kofax TotalAgility v7.x      



Article # 3035204
  • Was this article helpful?