As you might now, Microsoft recently started promoting Project Server Online. Previously, it was required to host Project Server on your own on-premise systems or in the cloud on Microsoft Azure. Now since both use a slightly different authentication method. I will cover them in this article.
No authentication
If you were to use no authentication with your Project Server installation it would just simply look like this:
Project Server on-premises installation
Project Server Online
Optimization
Because ProjectContext inherits from Microsoft.SharePoint.Client.ClientContext, it also implements IDisposable, which means you should be using it in a ‘using-clause’ as below so resources are released afterwards.