16 Replies Latest reply: Oct 4, 2016 2:54 PM by Ganesh Devarashetty RSS

    QMS API - Using Certificates

    Chris Olver

      Hi,

       

      I am trying to use the example as found in the SDK Docs and attempting to connect to the QMS API but keep getting the error:

       

      > The HTTP request was forbidden with client authentication scheme 'Anonymous'.

       

      I am trying to connect to the QMS API on a developer machine which is on a different network. I installed the certificates on the developer machine by exporting on the Qlikview server and importing on the dev box. Any ideas how I can connect to the QMS API remotely?

        • Re: QMS API - Using Certificates
          Erik Gustafsson

          Hi Chris,

           

          As stated in the Server Reference Manual, you also need to be a member of the "QlikView Management API" security group, see page 59: https://d1cf4w4kkla6tb.cloudfront.net/qlikview/11.20/12451/QlikView%20Server%20Reference%20Manual_ENG.pdf . Also ensure the ports are open, so easiest way to test that it works is by doing it locally first.

           

          Regards,

          Erik

            • Re: QMS API - Using Certificates
              Chris Olver

              Hi Erik,

               

              This fails locally as well as remotely. Also the user running Qlikview is in all groups.

               

              -Chris

                • Re: QMS API - Using Certificates
                  Erik Gustafsson

                  Hi Chris,

                   

                  If this fails locally then you might want to start investigating on that end. Ensure the user you are running with is running as an administrator (Right click on the program and select "Run as an administrator") and is a member of "QlikView Administrators", Local "Administrators" and "QlikView Management API" groups.

                  I would recommend to test with the QMS API Client first, part of the power tools. Then you can test commands too. It is an unsupported product but it is quite neat. Accessible at Power Tools 1.2 for QlikView . Ensure that the service address matches your QMC, that the Service Version is correct and that you automatically retrieve new service key if needed.

                   

                  Regards,

                  Erik

              • Re: QMS API - Using Certificates
                Chris Olver

                Hi Erik,

                 

                Managed to get a solution:

                 

                I deleted all certificates.. Rebooted a number of times and allowed Qlikview to recreate all the certificates. It appeared when I did the original export of certificates under the *administrator* account I should of exported it under the user that runs the Qlikview services. To resolve the problem:

                 

                1. Signed in to the server desktop as the user who runs the services (in > this case "QlikviewUser")
                2. Load up MMC.exe :: Certificates :: Local Computer (not personal or service)
                3. Exported all 3 Certificates with Private Key (Private key isn't available under any other user). If you export them as another user it'll export them successful but its not including the private key.. So it has to be signed in as the user who runs the Qlikview Services and under Local Computer. I did try giving the Administrator user access to the private key under Local Computer but this didn't resolve the problem.
                4. Sign in as the Administrator User or whatever user you want to use the API under to the Desktop
                5. Go to MMC :: Certificates :: Personal
                6. Import all 3 certificates.
                7. Success

                 

                This is how I got it to work under other users on the local server box. Previously, all the certificates were marked as valid and were  installed following the Qlikview manual line by line. It seems as if this "functionality" hasn't been documented very well.

                 

                To get it working remotely, I added the Qlikview Server's name in my hostfile and added the certificates to the Local Computer and Personal times. After this it resolved itsself.

                 

                Only challenge yet is how to configure the API in Qlikview to use a FQDN instead of a computer hostname.