• vvvv
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies

Hello,

 

I am trying to execute a Http Callout to a webservice that is with windows machine and the credentials were given to me as domain\username

password

 

I wrote a simple http callout as mentioned in the docs. Did the base 64 thing for username:pwd but I keep getting

HttpResponse[Status=Unauthorized, StatusCode=401]

 

I tried to put domain as domain\username, domain:username:password with other combinations of moving domain first and last but nothing seems to work.

 

I have my authorizationheader set as follows

 

    Blob headerValue = Blob.valueOf(username + ':' + password);
    String authorizationHeader = 'NTLM ' +   EncodingUtil.base64Encode(headerValue);

 

I tried BASIC above and then tried NTLM too but with same result.

 

Any help is greatly appreciated.

 

Thanks

  • February 23, 2011
  • Like
  • 0