Forum Discussion

mchaudhari's avatar
mchaudhari
New Contributor
7 years ago

NTLM Authorization does not work with SOAPUI where as simple GET url in browser or Postman work well

Hello Team,

Presently with SOAPUI version 5.4.0 I am trying to fire a GET request to generate an access token for further use in other REST calls. However when I tried to send the request via SOAPUI, it returns a Fault code 401. Can you please help me get rid of this?

 

I tried with domain\username and \username but didn't work.

 

Attached HTTP  and SOAPUI logs.

 

HTTP logs:

 

Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "GET /hantweb.v2/a/token?service=stage-som-hs.XXXXXXXXX.com&scope=SOMSERVICEWRITERNP&expiry=1440 HTTP/1.1[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "authorization: NTLM TlRMTVNTUAADAAAAGAAYAFYAAAAYABgAbgAAAAAAAABIAAAADgAOAEgAAAAAAAAAVgAAAAAAAACGAAAABYKIogUBKAoAAAAPQwBoAGEAdQBkAE0AQgCK9n2wgSfE/wAAAAAAAAAAAAAAAAAAAACrBH5C47NryIw9NeLikzCCgjjQr=[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "Host: hantweb-stage.XXXXXXXXX.com[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "WWW-Authenticate: Negotiate[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "WWW-Authenticate: NTLM[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "Date: Sun, 25 Feb 2018 13:52:08 GMT[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "Content-Length: 0[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "GET /hantweb.v2/a/token?service=stage-som-hs.XXXXXXXXX.com&scope=SOMSERVICEWRITERNP&expiry=1440 HTTP/1.1[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "authorization: NTLM TlRMTVNTUAADAAAAGAAYAFYAAAAYABgAbgAAAAAAAABIAAAADgAOAEgAAAAAAAAAVgAAAAAAAACGAAAABYKIogUBKAoAAAAPQwBoAGEAdQBkAE0AQgCK9n2wgSfE/wAAAAAAAAAAAAAAAAAAAACrBH5C47NryIw9NeLikzCCgjjQr=[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "Host: hantweb-stage.XXXXXXXXX.com[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:>> "[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "WWW-Authenticate: Negotiate[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "WWW-Authenticate: NTLM[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "Date: Sun, 25 Feb 2018 13:52:08 GMT[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "Content-Length: 0[\r][\n]"
Sun Feb 25 08:52:08 EST 2018:DEBUG:<< "[\r][\n]"

 

 

 

 

SOAPUI Logs:

 

Sun Feb 25 08:52:08 EST 2018:DEBUG:Attempt 1 to execute request
Sun Feb 25 08:52:08 EST 2018:DEBUG:Sending request: GET /hantweb.v2/a/token?service=stage-som-hs.XXXXXXXXX.com&scope=SOMSERVICEWRITERNP&expiry=1440 HTTP/1.1
Sun Feb 25 08:52:08 EST 2018:DEBUG:Receiving response: HTTP/1.1 401 Unauthorized
Sun Feb 25 08:52:08 EST 2018:DEBUG:Connection can be kept alive indefinitely
Sun Feb 25 08:52:08 EST 2018:DEBUG:Target requested authentication
Sun Feb 25 08:52:08 EST 2018:DEBUG:Authorization challenge processed
Sun Feb 25 08:52:08 EST 2018:DEBUG:Authentication scope: NTLM <any realm>@hantweb-stage.XXXXXXXXX.com:443
Sun Feb 25 08:52:08 EST 2018:DEBUG:hantweb-stage.XXXXXXXXX.com:443 requires Windows authentication
Sun Feb 25 08:52:08 EST 2018:DEBUG:Found credentials
Sun Feb 25 08:52:08 EST 2018:DEBUG:Attempt 2 to execute request
Sun Feb 25 08:52:08 EST 2018:DEBUG:Sending request: GET /hantweb.v2/a/token?service=stage-som-hs.XXXXXXXXX.com&scope=SOMSERVICEWRITERNP&expiry=1440 HTTP/1.1
Sun Feb 25 08:52:08 EST 2018:DEBUG:Receiving response: HTTP/1.1 401 Unauthorized
Sun Feb 25 08:52:08 EST 2018:DEBUG:Connection can be kept alive indefinitely
Sun Feb 25 08:52:08 EST 2018:DEBUG:Target requested authentication
Sun Feb 25 08:52:08 EST 2018:DEBUG:Authorization challenge processed
Sun Feb 25 08:52:08 EST 2018:DEBUG:Authentication scope: NTLM <any realm>@hantweb-stage.XXXXXXXXX.com:443
Sun Feb 25 08:52:08 EST 2018:DEBUG:Authentication failed
Sun Feb 25 08:52:08 EST 2018:INFO:Got response for [https://hantweb-stage.XXXXXXXXX.com.Token:Request 1] in 82ms (0 bytes)
Sun Feb 25 08:52:38 EST 2018:DEBUG:Connection closed
Autosaving Workspace
Sun Feb 25 08:56:09 EST 2018:INFO:Backing up [C:\Users\YYYYYYYY\Documents\REST-Project-1-soapui-project.xml] to [C:\SOAPUI\BACKUP\REST-Project-1-soapui-project.xml.backup]
Sun Feb 25 08:56:09 EST 2018:INFO:Saved project [Read XLS Project] to [C:\Users\YYYYYYYY\Documents\REST-Project-1-soapui-project.xml - 2578 bytes
Sun Feb 25 08:56:09 EST 2018:INFO:Backing up [C:\Users\YYYYYYYY\Documents\REST-Project-2-soapui-project.xml] to [C:\SOAPUI\BACKUP\REST-Project-2-soapui-project.xml.backup]
Sun Feb 25 08:56:09 EST 2018:INFO:Saved project [SOM_Project1] to [C:\Users\YYYYYYYY\Documents\REST-Project-2-soapui-project.xml - 18476 bytes
Sun Feb 25 08:56:09 EST 2018:INFO:Backing up [C:\SOAPUI\DOCS\Soapui_Pack\Recording scripts\module7\SQL.xml] to [C:\SOAPUI\BACKUP\SQL.xml.backup]
Sun Feb 25 08:56:09 EST 2018:INFO:Saved project [DB Project] to [C:\SOAPUI\DOCS\Soapui_Pack\Recording scripts\module7\SQL.xml - 5223 bytes
Sun Feb 25 08:56:09 EST 2018:INFO:Saved workspace to [C:\Users\YYYYYYYY\default-soapui-workspace.xml]
Autosaving Workspace
Sun Feb 25 09:01:09 EST 2018:INFO:Backing up [C:\Users\YYYYYYYY\Documents\REST-Project-1-soapui-project.xml] to [C:\SOAPUI\BACKUP\REST-Project-1-soapui-project.xml.backup]
Sun Feb 25 09:01:09 EST 2018:INFO:Saved project [Read XLS Project] to [C:\Users\YYYYYYYY\Documents\REST-Project-1-soapui-project.xml - 2578 bytes
Sun Feb 25 09:01:09 EST 2018:INFO:Backing up [C:\Users\YYYYYYYY\Documents\REST-Project-2-soapui-project.xml] to [C:\SOAPUI\BACKUP\REST-Project-2-soapui-project.xml.backup]
Sun Feb 25 09:01:09 EST 2018:INFO:Saved project [SOM_Project1] to [C:\Users\YYYYYYYY\Documents\REST-Project-2-soapui-project.xml - 18476 bytes
Sun Feb 25 09:01:09 EST 2018:INFO:Backing up [C:\SOAPUI\DOCS\Soapui_Pack\Recording scripts\module7\SQL.xml] to [C:\SOAPUI\BACKUP\SQL.xml.backup]
Sun Feb 25 09:01:09 EST 2018:INFO:Saved project [DB Project] to [C:\SOAPUI\DOCS\Soapui_Pack\Recording scripts\module7\SQL.xml - 5223 bytes
Sun Feb 25 09:01:09 EST 2018:INFO:Saved workspace to [C:\Users\YYYYYYYY\default-soapui-workspace.xml]