1 Reply Latest reply: Jan 2, 2017 11:15 AM by Tim Kendrick RSS

    ASP.NET Check if User Has Access Pass With Qlik Proxy Service

    Tim Kendrick

      I have an ASP.NET application that authenticates and redirects a user to a mashup. However, I need to check and see if the user has an access pass and is authorized to see that resource before I redirect them to the mashup. They will see this error if they are redirected and do not have proper authorization:

      No Acess Pass.PNG

      The Qlik Sense Proxy Service returns a qlikTicket whether or not the UserId or UserDirectory actually exist in the active directory. So, it would be nice to catch any unauthenticated users in the web application before they wait 5-10 seconds to be redirected only to see an error.

       

      Thanks!

        • Re: ASP.NET Check if User Has Access Pass With Qlik Proxy Service
          Tim Kendrick

          Quick Update: I found a way using header authentication and the QRS to check if a user exists in Qlik Sense. Still not checking if the user has an access pass, but it is one step closer. I am using Postman to check the results of these requests.

           

          Type: GET

           

          URL: https://[server name]/[auth prefix]/qrs/user/count?filter=Name%20eq%20%27[username]%27&Xrfkey=12ab34cd56ef78gh

           

          Headers:

          1)     X-Qlik-Xrfkey : 12ab34cd56ef78gh

          2)     [auth header name] : [domain]\[admin username]

           

          The username in the URL does not need the domain. 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. 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:

           

          {

               "value": 1

          }

           

          Thereby verifying that the user exists.