Skip to main content

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());

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

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!