My situtation is very very similar to the one mentioned on Eradicating 401 "Unauthorised" responses followed by 200 "Ok" responses
But it doesn't provide an adequate response for us.
I have an example of simple GET request, when made by running the api locally without IIS results in one response which is OK/200: Fiddler trace here
But when it's hosted on IIS it returns two 401s and one 200: Fiddler trace here
Also here's the IIS network auth configuration : Config
In application that calls the API we check for 200 Response code and we receive intermittent 200/401 in the code which makes the validation really annoying, the request goes through perfectly in each case.
Any help here would be very much appreciated, if this is the way the NTLM authentication works, is there any other way to validate the call to the api was successful eventually? As in the end that's what we want to know in the caller application.
As mentioned in some articles I have tried moving NTLM to the top of the providers list (Negotiate at bottom) in IIS -> Authentication -> Providers list but that doesn't resolve this
Thanks for taking a look.
Edit: Here's the request headers in fiddler in case of IIS:
Edit 2: Based on answer by MisterSmith and some other reading, this is the way NTLM authentication works, its more about how we handle the response in the application.
In my case I am using .net core HttpClient Library to make a request and it has a possible issue with the way it handles NTLM authentication. If anyone is interested in that it can be found here: NTLM authentication HttpClient in Core