Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
EliGohar
Partner - Creator III
Partner - Creator III

NTLM authentication with QRS API

Hi everybody,

I'm trying to use NTLM authentication mode instead of certificates using QRS API.

Here's the snippet code I tried so far:

//QRS utility
// url = "https://bc-poc:4242/qrs/systeminfo"
				
// NTLM - Doesn't work, error 403
request.UserAgent = "Windows";
request.PreAuthenticate = true;
var nc = new NetworkCredential("username", "password");
CredentialCache credentialCache = new CredentialCache();
credentialCache.Add(new Uri(url), "NTLM", nc);
request.Credentials = credentialCache;
				
				
// Certificate - Works OK
request.ClientCertificates.Add(_certificate);
request.ServerCertificateValidationCallback += ServerCertificateValidationCallback;

I also tried to work with the following SDK:

https://www.nuget.org/packages/QlikSenseRestClient/

Unfortunately using this SDK I got the same 403 error. 

I'm looking for sample code or a simple project that connects to the Qlik QRS using NTLM authentication.

Also, It should be on .net and not in python.

Thanks

Eli.

 

Labels (1)
2 Replies
Øystein_Kolsrud
Employee
Employee

A 403 actually sounds more like a security rule issue (or possibly an incorrect endpoint) than an authentication issue. Authentication problems typically trigger a 401. Which endpoint is triggering the 403? And are you able to do "GET /qrs/about"?

By the way, I recently updated the library you are referring to so that it can support login using non-default credentials. Please try it out! It would be great to get a confirmation that it's actually working in other environments than just on my machine 🙂

And also, there was a very similar question to this one posted on Community just before yours that might be of interest to you:

https://community.qlik.com/t5/Qlik-Sense-Integration/Windows-authentication-and-QRS-API-works-only-u...

turribeach
Contributor II
Contributor II

Have a look at this post, I successfully authenticated using NTLM from a Linux machine:

https://community.qlik.com/t5/Integration-Extension-APIs/Executing-a-QlikSense-Task-using-the-QRS-AP...