ms-projectproject-serverms-project-server-2013ms-project-server-2010ms-project-server-2016

How can I programmatically retrieve a list of project file names from Project Server?


I have a tool that needs to open Project files to get data out of them. Some of these project files are hosted on the Project Server site rather than a network location that can be browsed to with a normal file explorer.

I know you can open files that are hosted on Project Server using the FileOpenEx method using the <>\[FileName] notation. I just need to get a list of the project names on Project server.

Is this possible? If so, how can I do it?


Solution

  • I was able to figure this out by installing the Microsoft.SharePointOnline.CSOM NuGet package (my program is created with visual studio, not VBA). Then following this guide

    An interesting note is that Microsoft Project Server and Microsoft Project Online behave differently when trying to access them. To be able to query MS Project Online, I had follow this example and load web cookies from the pwa site before executing the query.