I have the MS Project Online account at sharepoint.com and I need to authenticate from client C# code to PSI services to get list of projects.
Server has Forms based authentication. I am trying to login via next code:
SvcLoginForms.LoginForms loginform = new SvcLoginForms.LoginForms();
loginform.Credentials = new NetworkCredential("admin@myserver.onmicrosoft.com", "password");
loginform.Url = "https://myserver.sharepoint.com/sites/pwa/_vti_bin/PSI/Project.asmx";
loginform.Login("admin@myserver.onmicrosoft.com", "password");
When I am executing loginform.Login I am getting SoapException with message: "Value cannot be null. Parameter name: account". Inner exception xml is:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Value cannot be null.
Parameter name: account
What I am doing wrong?
Authentication to Project Online PSI services is described in this excellent article: http://www.umtsoftware.com/blog/how-to-project-online-psi/
You can use:
instead of
First: Install required Client SDK
Second: add the reference to your project
You can find the dlls in
%programfiles%\Common Files\microsoft shared\Web Server Extensions\15\ISAPI
and%programfiles(x86)%\Microsoft SDKs\Project 2013\REDIST
Here is sample code: