VBA MSXML2.ServerXMLHTTP60 Web Request with Kerberos Authentication

38 views Asked by At

I have a VBA script using MSXML2.ServerXMLHTTP60 for web requests.

Is there any way to get Kerberos authentication working with these requests? The requests are always coming back 401 Unauthorized when I try with it.

I've confirmed my web app works with Kerberos authentication in Chrome/Edge, so that's set up properly.

I know it can work with WinHttp.WinHttpRequest by using SetAutoLogonPolicy(0), but we need to use MSXML2.ServerXMLHTTP60 for other reasons.

For reference, here's the basic code. The actual URL and body are correct. If I disable Kerberos on the URL side this works fine.

Dim http As New MSXML2.ServerXMLHTTP60
Call http.Open("POST", url, False)
Call http.send(body) ' <=== 401 Unauthorized returned
0

There are 0 answers