We have a data server set up in IIS using Windows Authentication (Kerberos). Does anyone know how to call web services (GET and POST) from R authenticating against the Windows identity?
Asked
Active
Viewed 3,569 times
16
-
May b you should try https://rdotnet.codeplex.com/ – Venkata Dorisala Jul 27 '16 at 09:40
-
I am trying to just call an http get or post from R, not to call R from .NET... – Roland Buergi Jul 27 '16 at 09:51
-
`setInternet2(TRUE)` should be of help, asking R to to use windows networking. (if your script execute from a windows box) – Tensibai Jul 27 '16 at 09:52
-
When trying this command in R 3.3.1 I get "Error in setInternet2(TRUE) : use != NA is defunct". Any idea why? – Roland Buergi Jul 27 '16 at 11:02
-
@Roland Absolutely not, as I'm not using R .3.3.1, maybe reading the doc with `?setInternet2` could be of help ? (And can you confirm you're working on a windows machine ?) – Tensibai Jul 27 '16 at 12:16
-
Yes, I am using Windows. The doc has the answer indeed: "As from R 3.3.0 it changes nothing, and only use = NA is accepted." – Roland Buergi Jul 27 '16 at 13:06
1 Answers
25
Eventually, I found out how to achieve this via NTLM. It is actually simple:
require("httr")
GET("http://my-url",authenticate(":", ":", "ntlm"))

Roland Buergi
- 1,157
- 9
- 23
-
3nice! your answer made me seem very clever on job today and people were literally celebrating :) – Soren Havelund Welling Nov 07 '19 at 17:46