Project Server 2016 CSOM code with Claim based Authentication


  • One of our clients has enabled ADFS on his Project server 2016 In premise environment .  We are using CSOM operation in our custom application and CSOM operations have failed due to this change.


    For ADFS Claims based authentication we need to pass Authenticated cookie . Can someone help us with how to add authenticated Cookie with CSOM code.



    Existing CSOM Code for getting list of projects:

            public static void GetProjectListInpremise()


                NetworkCredential net = null;


                Console.WriteLine("Read Project Online Started ..");

                string PWAOnlineUrl = ConfigurationManager.AppSettings["pwaInpremiseUrl"];

                string userName = ConfigurationManager.AppSettings["pwaInpremiseUser"];

                string password = ConfigurationManager.AppSettings["pwaInpremiseUserPwd"];

                string domain = ConfigurationManager.AppSettings["pwaInpremiseDomian"];

                net = new NetworkCredential(userName, password, domain);


                ProjectContext projContext = null;

                projContext = new ProjectContext(PWAOnlineUrl);

                projContext.Credentials = net;




                Console.WriteLine("Read Project Execute Query Successful..");


                foreach (PublishedProject pubProj in projContext.Projects)




                    Console.WriteLine("Project Name :" + pubProj.Name);







    Rabu, 24 Oktober 2018 09.42