<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ASP.NET Check if User Exists Using the QRS in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259658#M6867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works even with authentication header. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Jan 2017 06:49:06 GMT</pubDate>
    <dc:creator>s29124141</dc:creator>
    <dc:date>2017-01-24T06:49:06Z</dc:date>
    <item>
      <title>ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259655#M6864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;I currently have an ASP.NET app that uses tickets to authenticate users before redirecting them into an app. However, some of my users may not have a valid license or token assigned to their account. Rather than redirecting them to an error page, I'd rather check if the user 1) exists and 2) has a valid token / license. This article focuses on item 1, checking if the user exists.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #333333;"&gt;In this example,&lt;/SPAN&gt; &lt;SPAN style="color: #3366ff; text-decoration: underline;"&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/3.1/Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-Getting-Started.htm"&gt;Repository Service API Paths&lt;/A&gt;&lt;/SPAN&gt;, &lt;SPAN style="color: #333333;"&gt;we see a way to count the number of users of a certain name. What's left out of this article is how, exactly, to construct the web request with its appropriate headers. I personally use the free version of&lt;/SPAN&gt; &lt;A href="https://www.getpostman.com/"&gt;&lt;SPAN style="color: #3366ff; text-decoration: underline;"&gt;Postman&lt;/SPAN&gt;&lt;/A&gt; t&lt;SPAN style="color: #333333;"&gt;o quickly test API requests before building anything in my application.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;Here are the basics for setting up a request to count the number of users in your Qlik Sense deployment that have a certain name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Type:&lt;/STRONG&gt; &lt;SPAN style="color: #333333;"&gt;GET&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;URL:&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3778c7; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;SPAN style="color: #333333;"&gt;&lt;A class="jive-link-external-small" href="https://[server" rel="nofollow" target="_blank"&gt;https://[server&lt;/A&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;name]/[auth prefix]/qrs/user/count?filter=Name%20eq%20%27[username]%27&amp;amp;Xrfkey=12ab34cd56ef78gh&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Headers:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #333333;"&gt;1)&amp;nbsp;&amp;nbsp;&amp;nbsp; X-Qlik-Xrfkey : 12ab34cd56ef78gh&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #333333;"&gt;2)&amp;nbsp;&amp;nbsp;&amp;nbsp; [auth header name] : [domain]\[admin username]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #333333;"&gt;The username in the URL does not need the domain. &lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;The username in the header should be a user that is allowed to access the QRS. The username in the URL parameter should be the user you want to check if exists.&lt;/SPAN&gt; Assuming the admin user specified in the header has access to the QRS and the user you are check in the URL parameter exists, you will be returned, simply:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #333333;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #333333;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "value": 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #333333;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Here are a couple things I encountered while testing that bear explaining:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG style="color: #000000;"&gt;How do I set up header authentication in the first place?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here is pretty much the go-to document for setting up header authentication: &lt;A href="https://community.qlik.com/docs/DOC-8135"&gt;Qlik Sense 1.1: Set Up Header Auth Virtual Proxy&lt;/A&gt;. The bracketed items in the example above will make a bit more sense after reading this if you are unfamiliar with the QRS.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG style=": ; color: #000000; font-size: 12pt;"&gt;Why the weird looking URL?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="color: #333333;"&gt;The cross-site scripting parameter (Xrfkey) is necessary for all header requests. This is a 16 character alphanumeric string and should be randomly generated when performing header requests automatically from your application. The parameter &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;filter=Name%20eq%20%27[username]%27&lt;/SPAN&gt; is interpreted as f&lt;/SPAN&gt;&lt;SPAN style="color: #333333; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;ilter=Name eq '[username]' by the QRS as a three-element expression which states in plain English, filter the Name such that it is equal to exactly [username].&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG style=": ; color: #000000; font-size: 12pt;"&gt;Shouldn't I be specifying port 4242?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This document, &lt;A href="https://help.qlik.com/en-US/sense-developer/3.1/Subsystems/RepositoryServiceAPI/Content/RepositoryServiceAPI/RepositoryServiceAPI-Connect-API.htm"&gt;QRS API URLs&lt;/A&gt;, explains that you can use either the machine name of the Qlik Sense server plus the port name, or you can specify the proxy machine name in which case you don't need the port. In my installation, I have a custom domain name and SSL for my server, so I just use that domain name as my [server name]. Also, I simply couldn't get the machine name:4242 to even work.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000;"&gt;W&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 12pt;"&gt;hy do we use [admin username] in Header 2?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The admin username that you use in the header must be someone with permissions to use the QRS. Additionally, if you were to use the same username as in the URL parameter (the one you are trying to check) you will actually end up creating the user in Qlik Sense. So the first time you ran the request you would receive "value":0 and if you ran the exact same thing a second time, you would see "value":1 and if you checked your list of users (/qmc/users) you would see an entry for the username you were trying to check.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG style=": ; color: #000000; font-size: 12pt;"&gt;What happens if I don't use "/count"?&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if you leave the path as .../qrs/user?... and everything else remains the same, if the user does not exist, you will receive a response of "[]". If the user does exist, you will receive details about the user.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Please leave feedback! Happy authenticating!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jan 2017 17:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259655#M6864</guid>
      <dc:creator>TKendrick20</dc:creator>
      <dc:date>2017-01-02T17:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259656#M6865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/129589"&gt;tkendrick20&lt;/A&gt;‌ You can use the Postman as shown below and include the json request in the body.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="postman.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/148446_postman.jpg" style="height: 304px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2017 12:07:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259656#M6865</guid>
      <dc:creator>s29124141</dc:creator>
      <dc:date>2017-01-05T12:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259657#M6866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps if you are using certificate authentication this would work. My Postman rejects this request saying "Expected an authentication header."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, the path ...qrs/user/full... returns information for &lt;SPAN style="text-decoration: underline;"&gt;all&lt;/SPAN&gt; users. The headers Accept-Charset, Accept, and Content-Type seem to be unnecessary in this context, too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2017 14:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259657#M6866</guid>
      <dc:creator>TKendrick20</dc:creator>
      <dc:date>2017-01-05T14:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259658#M6867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works even with authentication header. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2017 06:49:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259658#M6867</guid>
      <dc:creator>s29124141</dc:creator>
      <dc:date>2017-01-24T06:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259659#M6868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to check if user &lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;has a valid token / license.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Raza&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jul 2018 09:04:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259659#M6868</guid>
      <dc:creator>muhammadraza</dc:creator>
      <dc:date>2018-07-15T09:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259660#M6869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be check this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/June2018/Subsystems/NetSDKAPI/Content/CodeExamples/Sample%20code%20for%20how%20to%20connect%20to%20Qlik%20Sense.htm" title="https://help.qlik.com/en-US/sense-developer/June2018/Subsystems/NetSDKAPI/Content/CodeExamples/Sample%20code%20for%20how%20to%20connect%20to%20Qlik%20Sense.htm"&gt;https://help.qlik.com/en-US/sense-developer/June2018/Subsystems/NetSDKAPI/Content/CodeExamples/Sample%20code%20for%20how…&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2018 08:38:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259660#M6869</guid>
      <dc:creator>BalaBhaskar_Qlik</dc:creator>
      <dc:date>2018-07-16T08:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259661#M6870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be check this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/20750"&gt;Ticket Authentication in a .NET web application&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2018 08:38:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259661#M6870</guid>
      <dc:creator>BalaBhaskar_Qlik</dc:creator>
      <dc:date>2018-07-16T08:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: ASP.NET Check if User Exists Using the QRS</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259662#M6871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this one also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/braathen/qlik-auth-net" title="https://github.com/braathen/qlik-auth-net"&gt;https://github.com/braathen/qlik-auth-net&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jul 2018 08:39:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/ASP-NET-Check-if-User-Exists-Using-the-QRS/m-p/1259662#M6871</guid>
      <dc:creator>BalaBhaskar_Qlik</dc:creator>
      <dc:date>2018-07-16T08:39:06Z</dc:date>
    </item>
  </channel>
</rss>

