API NTLM Authentication

I am writing a web app (angular/ IIS) which will pull Orchestrator Queue items and would like to use Active Directory to authenticate with Orchestrator but the NTLM token is giving me issues. I have found this link both helpful and frustrating for my specific case: How to authenticate orchestrator api using windows credentials - #3 by bajji245

I can successfully login to the authorize endpoint to retrieve bearer token from local credentials, but I do not understand how I can get NTLM token for AD authorization on orchestrator calls.

Based on what I have read is the NTLM token should be received from the server after handshake but I dont think orchestrator provides the NTLM token, so i am confused. Can someone please explain to me how to get the NTLM token in nodejs express API from AD credentials to use on Ochestrator calls?

1 Like

Hello,

I was able doing like this :

var uri = new Uri(OrchestratorLink);
var credentialsCache = new CredentialCache {{uri, “NTLM”, CredentialCache.DefaultNetworkCredentials}};
var handler = new HttpClientHandler { Credentials = credentialsCache };
var httpClient = new HttpClient(handler) { BaseAddress = uri, Timeout = new TimeSpan(0, 1, 0) };
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(“application/json”));

I don’t know if this will help you, but I had also this issue/question about NTLM Authentication.

Regards,
Diogo Nunes