3 Replies Latest reply on Nov 19, 2015 3:44 AM by lmlcoch

    Basic Authentication fails with Pi-WebAPI

    intercap

      We have set up a Pi-Web API server to allow Basic Authentication. We did this in the hopes that it would make developing Python applications and working with Chrome easier. Tests from I.E. work fine, but tests from Chrome always fail with the return:

       

      {

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

      }

       

      Unfortunately, no related messages show up in the event logs on any of the servers (Pi-Web API Server, Pi Server, AF Server), so we are haven't been able to locate the source of the error.

       

      Does anyone have any suggestions?

        • Re: Basic Authentication fails with Pi-WebAPI
          dng

          Hi Keith,

           

          Did you have multiple authentication methods configured for PI Web API? Different clients can have different behavior when multiple authentication methods are selected, and there is a particular issue affecting Google Chrome is both Kerberos and Basic authentication are enabled. For more information, please see this Live Library page (https://livelibrary.osisoft.com/LiveLibrary/content/en/web-api-v4/GUID-DA5C6E2D-46FE-4961-AF95-642E7B309D9F).

           

          Furthermore, to see the source of the error, open up Chrome developer tools (F12) and take a look at the request header. For basic authentication, you should see the request header with something like:

          Authorize: Basic xxx

          where xxx is the base64-encoded string for username:password. Check to make sure the authorization header is included in your request, and make sure your username and password combination is correct. Did chrome ever prompt you for the username and password when you first navigate to a PI Web API page?

          2 of 2 people found this helpful