I am trying to send a get request using below VBScript:
dim user, pass,url,Req
url = "url"
user = "DOMAIN\USER"
pass = "mypassword"
Set Req = CreateObject("Msxml2.ServerXMLHTTP.6.0")
Req.Open "GET", url, False
Req.setRequestHeader "Authorization", "NTLM" + Base64Encode(user + ":" + pass)
Req.send
Req.getAllResponseHeaders
This code results with a "Undefined Variable: Base64Encode" error. Removing the Base64Encode does not work either.
I have tried the copy the authentication header from a successful raw request in SOAPUI but still having the 401 error.
On the other hand I have sent the same get request using SOAPUI and Python. So there is nothing wrong with authorization info.
To Sum up: I need a VBScript to send a get request with NTLM authentication without using Base64Encode