none
Using CSOM.Net with Project Online RRS feed

  • Question

  • I have seen samples and examples that uses CSOM with Project Server on-premesis, to my understanding (please correct it if I am wrong) all the samples will use windows authentication the identity that runs the exe.

    How can I use CSOM with Project Online to Read anything, for example get projects list? using my project online credentials ?

    string pwaSte = "myTenant.sharepoint.com/sites/pwa"
    string userName = "myUsername@myTenant.onmicrosoft.com"

    string password = "myPassword"

    Then I need to authenticate and executeQuery?

    I have the same question with using LINQ queries over OData 

    A Code Sample would be more than appreciated..

    Friday, February 13, 2015 9:41 AM

All replies

  • Mohammed,

    Please take a look at this article which shows how to create a calendar exception in Project Online via CSOM.

    Cheers,

       James.


    James Boman BSc. MCP:EAD -

    Thursday, March 19, 2015 12:26 AM
  • ProjectContext projContext = new ProjectContext(urlPWA);

                    SecureString passwordSecurity = new SecureString();

                    foreach (char c in password.ToCharArray()) passwordSecurity.AppendChar(c);

                    projContext.Credentials = new SharePointOnlineCredentials(usuario, passwordSecurity);

    projContext.Load(projContext.Projects, c => c.Where(p => p.Name == nameProject).IncludeWithDefaultProperties(f => f.Name, f => f.Owner.Title, f => f.CheckedOutBy.Title, f => f.CheckedOutDate, f => f.IsCheckedOut));

    projContext.ExecuteQuery();


    Tuesday, October 18, 2016 1:15 PM