20

I am trying to use NTLM authentication for my REST calls to TeamCity using RestSharp.

IRestClient _client=new RestClient(_url);
_client.Authenticator = new NtlmAuthenticator            
(System.Net.CredentialCache.DefaultNetworkCredentials);

However it is not working. Please suggest if I am missing something.

Mad Dog Tannen
  • 6,725
  • 4
  • 28
  • 53
pinaki
  • 231
  • 1
  • 3
  • 5
  • How to implement the same using jQuery ajax? I want to consume a rest service which is in.. svc format, and fetch the json data.. – userAZLogicApps Apr 16 '19 at 06:30

3 Answers3

35

This now appears to be working properly and can be done very easily utilizing the NTLMAuthenticator like so:

RestClient client = new RestClient(_baseURL);
client.Authenticator = new NtlmAuthenticator();
cjones26
  • 3,157
  • 1
  • 29
  • 45
8

Try this:

var client = new RestClient(_baseURL)
{
     Authenticator = new RestSharp.Authenticators.NtlmAuthenticator()
};
arghtype
  • 3,966
  • 11
  • 39
  • 54
curt
  • 131
  • 1
  • 3
0

Not supported currently. Refer to the below thread.

http://devnet.jetbrains.com/thread/451079?tstart=0

pinaki
  • 231
  • 1
  • 3
  • 5