list enterprise templates RRS feed

  • Question

  • how to get a list of names of enterprise templates through CSOM (need for Project Online)

    through PSI I know how it's done

    ServiceReferenceForProject.ProjectSoapClient client = new ServiceReferenceForProject.ProjectSoapClient();
    ServiceReferenceForProject.ProjectDataSet.ProjectDataTable dataTable = client.ReadProjectStatus(Guid.Empty, ServiceReferenceForProject.DataStoreEnum.WorkingStore, string.Empty, (int)Project.ProjectType.Template).Project;

    but I need through CSOM!

    help me, please)

    Tuesday, October 14, 2014 4:32 AM

All replies

  • Hi,

    Have you looked at the ProjectContext.EnterpriseProjectTypes property?

    See link below:

    Hope this helps,

    Guillaume Rouyre, MBA, MVP, MCP |

    Tuesday, October 14, 2014 12:43 PM
  • Maybe off topic, but in case you want to use REST:



    Tuesday, October 14, 2014 3:24 PM
  • I don't understand how it can help ?
    Wednesday, October 15, 2014 4:52 AM
  • Hi,

    As far as I know this is not possible. I would expect it should be possible using the Projects collection filtered on ProjectType. But the Projects collection is a collection of the published projects only so the project templates are not included there.

    var projList = projContext.LoadQuery(projContext.Projects);
    String firstTemplateName = projList.First(proj => proj.ProjectType == ProjectType.Template).Name

    Wednesday, October 15, 2014 7:40 AM
  • find solution!

    But how to get SharePointOnlineCredentials by default ?

    Thursday, October 16, 2014 11:43 AM