3 Replies Latest reply on Aug 2, 2017 2:15 PM by gregor

    How to configure authentication for PiWebApi on a Windows 10 64 bit machine

    Rahuketu

      I am logging into my computer as COMP\userid ( where COMP is company's domain name)

      Pi Web Api is configured with default NTService/piwebapi and NTService/piwebcrawler

       

      Every call to piwebapi gives (except for help pages)

      {

        "Message": "Authorization has been denied for this request."

      }

       

      How to configure Pi WebApi on a windows 10 laptop

        • Re: How to configure authentication for PiWebApi on a Windows 10 64 bit machine
          mfoerster

          Hello Rahul,

           

          what authentication option do you have configured? Please provide a screenshot such as the following:

           

          Kind regards,

           

          Moritz

          • Re: How to configure authentication for PiWebApi on a Windows 10 64 bit machine
            rsun

            Hi Rahul,

            To make it works immediately, you can insert Anonymous under Kerberos to test if you are able to see data from PI Web API.

            Basically, there are three authenticate options Anonymous, Basic and Kerberos.

            Kerberos authentication is the most secure option, however it is more complicate to configure. You could take a look at this video OSIsoft: Create PI Coresight SQL Database/Configure PI Coresight through the Admin Page [v3.0.0.4] - YouTube at 18:13 to see how to setup Kerberos delegation. This is for PI Coresight, but same apply for PI Web API.

            For Basic authentication, you will have to insert username and encode password in your code to authenticate.

             

            You might also find PI Web API online course videos PI Web API I Online Course - YouTube  to be useful. It contains everything you needed to know.

             

            Thanks,

            Ricky

            2 of 2 people found this helpful
            • Re: How to configure authentication for PiWebApi on a Windows 10 64 bit machine
              gregor

              Hello Rahul,

               

              Please allow me to suggest checking the Release Notes before running a setup kit as good practice. Well, I must admit that I am also kind of lazy following this suggestion but when running into unexpected behavior, one should definitely consult with them. Let me quote the PI Web API 2017 Release Notes:

               

              Operating Systems

              The preferred, supported deployment platforms are Windows Server 2016 or Windows Server 2012 R2. Windows Server 2012 (Full Desktop Installation only) may also be used; however, use of Windows Server 2012 is discouraged, as planned enhancements to PI Web API will require functionality that is only available in later versions of Windows.

               

              Microsoft’s client operating systems, Windows 10 (64-bit only) may be used in a limited capacity for development and testing purposes only. Please make sure that two entries "RegisteredOwner" and "RegisteredOrganization" exist under the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion". If not, add those two entries with empty string values.

               

              Earlier versions of Windows and non-x64 versions of Windows are not supported.

               

              Can you please check the registry of your PI Web API host?