I have a website hosted in IIS that uses NTLM authentication. I can access the site without explicitly providing my credentials. The site itself has functionality that makes ajax calls to API endpoints hosted in an HTTP.sys Windows Service.
The ajax calls are configured like this:
const ajaxGet = (url) => $.ajax({
cache: false,
type: "GET",
url: `${url}`,
xhrFields: {
withCredentials: true
}
});
Everything works, but the browser (Chrome) always asks me to enter my credentials at least once when it calls the endpoint for the first time.
Is there a way to automatically use the NTLM credentials provided by IIS authentication instead of having to manually enter them?