2 Replies Latest reply on Oct 8, 2015 7:40 PM by Marcos Vainer Loeff

    Using windows authentication with PI SDK

    mdsterman

      We are migrating from legacy PI trust authentication to windows authentication.  Anyone have a c sharp or VBA code snippet that demonstrates how to use the PI SDK with windows authentication?

       

      Thank You

        • Re: Using windows authentication with PI SDK
          bshang

          Hi Martin,

           

          You will need to create a PI Mapping first for the Windows users. Then move the Windows options to the top of the PI SDK protocol order so it will be tried first. In the PI SDK code, you should not need to explicitly specify the user. PI SDK internally will detect what the current Windows user running the application is and present these credentials to the PI Data Archive.

          • Re: Using windows authentication with PI SDK
            Marcos Vainer Loeff

            Hello Martin,

             

            I just want to remind you that PI AF SDK is our recommended SDK for new development projects. If you have WIS properly configured, you will able to use the privileges of the domain account running your application to access the PI Data Archive, the same way that PI SDK does internally as explained by Barry

             

            If this is not a new project, I would consider this opportunity to migrate to PI AF SDK since this is the product that our development team is currently working on and adding new enhancements.