Connecting using Microsoft Windows authentication

When using Microsoft Windows authentication, connections are made using the URL of the proxy server plus the Qlik Sense Repository Service (QRS) API path needed. Note that the xrfkey parameter is also added as a URL parameter.

//Create the HTTP Request and add required headers and content in xrfkey

string xrfkey = "0123456789abcdef";

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(@"https://servername.com/QRS/app?xrfkey=" + xrfkey);

request.Method = "GET";

request.UserAgent = "Windows";

request.Accept = "application/json";

request.Headers.Add("X-Qlik-xrfkey", xrfkey);

// specify to run as the current Microsoft Windows user

request.UseDefaultCredentials = true;

// make the web request and return the content

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

Stream stream = response.GetResponseStream();

Console.WriteLine(new StreamReader(stream).ReadToEnd());

Note: This example only works with GET requests. To enable POST requests, the example must be expanded. See Issuing POST commands via the proxy.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?