Import Project Desktop files to Project for the web API
Published Jan 04 2021 03:51 PM 14.9K Views

You can now use an API through Powershell to import .mpp files into Project for the web! 

The instructions below will use your credentials to create a project from the .mpp file.  

Instructions: 

1.Download these files (link) and put them under one folder 
2.Open Powershell and navigate to that folder 

3.Run this command Import-Module .\ProjectImport.psm1 

4**.Run this command ImportProject -InstanceId your instance ID -FilePath "Your full filepath * 

 

When Project has finished importing your .mpp file, you will see a success message with a URL to your new project. From here, your imported project will behave exactly like any other project in Project for the web. 

 

*See the FAQ, Tips, & Tricks section below if you have an issue with these steps! 

**To find your Instance ID: 

a. In the Dynamics 365 Administration Center, select the default instance, and then click Open. 

 
 
 

mpp 1.png

 b. On the PowerApps setting page, look at the first part of the URL to determine your Instance ID value. In the graphic below, the Instance ID value would be https://orgde6d15d8.crm.dynamics.com. 

 

 

 mpp 2.png

 

 

FAQ, Tips, & Tricks 

Q: Can I import tasks from my .mpp file into an existing project? 

A: We do not currently support project updates through .mpp import. Importing a .mpp file will create a new project. 

 

Q: Are there any limits on what .mpp files I can import through the API? 

A: The normal Project for the web limits apply to imported .mpp files. If you attempt to import a .mpp file that violates these limits, you will see an error when importing. You can find these limits here.  

 

Q: I’m seeing an error when I try to run the first Powershell instruction. What should I do? 

A:  If you’re seeing an error, try unblocking the dll files then run this instruction again.  

To unblock a file: 

  1. Right-click the file and open the Properties pane 
  2. Scroll to the bottom of the pane to the Security section 
  3. Toggle the ‘Unblock’ toggle in this section 
  4. Click Apply 
 

mpp 3.png

 

Once you’ve unblocked both files, you should re-attempt to import your project.  

 

Q: Some of my data wasn’t there when I opened my imported project. What’s going on? 

A: Project for the web has does not support all features included in Project Desktop. To make it possible to import .mpp files into Project for the web, some data must be dropped to fit into the new environment.  

For now, some of the data the API does not import includes:

  • Resources
  • Baselines
  • Sub Projects

If you would like to learn more about the differences between Project for the web and Project desktop, you can check out our support article here.

 

Please let us know what you think in the comments!

22 Comments
Brass Contributor

The list of unsupported features needs to be addressed before this import capability becomes really meaningful.  Would have been nice to have seen other features implemented in PftW first so the import capability was more relevant. In any event import should be supported in the UI rather than through Powershell. A rather clunky approach to what should be basic functionality.

Copper Contributor
Is there a similar API for importing Project for the Web into Project Online, and/or vice versa?
Brass Contributor

Deadline, constraints, and links are 3 top priorities. This must be adressed. Even occasional PM will need those 3 : deadline needs to be set (and consequently alerts when they are not met) , date constraints exist all the time in real time, and link lags and Start Start, Finish Finish link are all alive in 90% of projects schedules. 

Copper Contributor

This worked for me as a PowerShell 5 script, but failed on the AcquireToken when using PowerShell 7 (my default on this computer) ...

 

Do you have any plans to release a PowerShell 7 version, or is the expectation going to be that this will be implemented in the interface, mid/long term?

Copper Contributor

I will wait for these unsupported features to be implemented before using Project Online. Absolutely need those to use it.

Copper Contributor

In response to Conrad's comment "I will wait for these unsupported features to be implemented before using Project Online. Absolutely need those to use it" -  Project Online interfaces directly with the Project Professional Desktop client.  I see little point in anyone wanting to import from Project for the Web to Project Online.  If you use Project Online you already have all of the features and capabilities needed.  The list of unsupported features at the head of this thread refers to Project for the Web NOT Project Online (where all of those unsupported features already exist). To be clear the unsupported features refers to Project for the Web not Project Online.   You can use Project Online Essentials for pure browser capability. Unfortunately Microsoft have done a poor job of the messaging which has confused customers and prospects.   And for clarity, the original comment referred to the inability to import Project mpp files (from the Project Desktop Client) to Project for the Web.   Project for the Web is a very lightweight browser only solution compared to the full Project Online solution. 

Copper Contributor

Hi

I tried this option  

 

i could only sees activities list and their grouping without any dependencies and start+finish dates.

We understand "Project for Web" has less features than Project profession but as user of both these platforms we except MS to work on common fields mapping between two platforms and publish that for end users. Simple import and export with minimum supported fields should be available to make it much more effective.

 

I see a use-case where professional project managers still uses Project professional Desktop version for advance features but should have tools to import+export  some of project activities or group of activities into  Project for Web collaborative tool . This could be done with easy to define common excel template which could be used as an intermediate step.

 

Copper Contributor

Thank you for your work on this.  I am having an issue with the script I am hoping you can help with:

Here is the error I get:

ImportProject: Exception calling "AcquireToken" with "4" argument(s): "Windows Principal functionality is not supported on this platform."

The environment is: Macbook, OS 11.2, newly installed PowerShell v 7.1.1, OpenSSL installed.  I have the paths setup correctly and my project.microsoft.com site is up and running with projects in place.

 

The user I am logged in as has Read/Write access to the DLL files. [Blocked doesn't seem to correlate to Mac OS]

 

Any ideas?

Thanks,

John

Brass Contributor

@John Burns This will only work on a Windows OS.  The fact that you are importing .mpp files assumes that you have the Microsoft Project client installed and there is no such client for Mac OS. I don't even know whether it would work on a Windows emulator such as Parallels, either way you need to have the Microsoft Project Desktop Client installed. 

 

Copper Contributor

Looking forward to a GUI option for this. 

 

In the meantime, tried this method, but we have admin consent enabled in our tenant so the "oneproject_test_native" Ent App registration is halted while it waits for approval. Requested the approval, our authorized person did the approval, and when I ran the script again, it acted like it was being registered for the first time again: asked for admin consent once more. 

 

Admin checked AAD and cannot find the app in the Enterprise Apps listing. Checks the log and sees that the request to approve it failed. Request shows as in progress still, but every time it's attempted to be approved, it fails as though the app no longer exists, even though no one touched it in AAD.  Thoughts?

Copper Contributor

I am running into a problem with the process.  Below is the command line I am using and the error message.  Where am I going wrong?

 

PS C:\alex> -InstanceId https://org9ae306c7.crm.dynamics.com -FilePath "C:\alex\Jove.mpp"


-InstanceId : The term '-InstanceId' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:2
+ -InstanceId https://org9ae306c7.crm.dynamics.com -FilePath "C:\alex\ ...
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (-InstanceId:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

worked like a charm! the key is to unblock the files as mentioned in the FAQ

 @nislabs : you forgot drill down to the folder where you got the psm1 file. also you need to use importproject cmdlet. for ex for me it was: PS C:\Users\mysuser\desktop\folderwiththemodule> ImportProject -InstanceId https://xxxxxxxxx.crm4.dynamics.com/ -FilePath "C:\Users\xxxxxxx\Desktop\Residential Construction 2021.mpp" this imported it successfully. in a couple of seconds it popped on my project.microsoft.com portal.

Hi all!

 

Thanks for the discussion on this thread. We really appreciate your feedback here. I'd like to answer a few questions about this for you all.

 

Firstly, with regards to the missing features on Project for the web, we do have plans to implement a few of these features in Project for the web. You can always check out our public roadmap here to see our upcoming features. If there are additional features that are not listed there, I would recommend you give us feedback through the in-app button (by clicking the smiley face in the top-right corner of the app) and telling us which features specifically you need from Project Desktop. This will help us organize the feedback by specific feature so we can accurately prioritize our features.

 

I don't have any solutions to your specific problems but I will look into them and update our blog post as we find other common issues that users have with this script. Thanks so much for bringing these to our attention!

Copper Contributor

Hi,

 

Thanks for supplying the tools.  I am running into a problem.  Do you have any suggestions?

 

Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly
'file:///C:\alex\Microsoft.IdentityModel.Clients.ActiveDirectory.dll' or one of its dependencies. Operation is not
supported. (Exception from HRESULT: 0x80131515)"
At C:\alex\ProjectImport.psm1:32 char:1
+ [Reflection.Assembly]::LoadFrom("$path\Microsoft.IdentityModel.Client ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : FileLoadException

Import-Module : The specified module '.\ProjectImport.psm1' was not loaded because no valid module file was found in
any module directory.
At line:1 char:1
+ Import-Module .\ProjectImport.psm1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (.\ProjectImport.psm1:String) [Import-Module], FileNotFoundExceptio
n
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

Copper Contributor

@nislabs I'm getting the same error.
Any thoughts on how to fix it?

Brass Contributor

Hi @Microsoft Project Team 

 

Simple solution - as with all other office products, how about adding an open button from which we can (here's a hint) open the files. Don't make us head out to graph api, get our users to submit helpdesk tickets so we can copy their files then run the script. 

 

The licenses are a third of the cost of a PP3 sure, but with no desktop application development and support, how can you justify charging anything for a piece of software with such limited functionality? The web kool-aid shouldn't mean we just take the lowest, most basic frontpage created rubbish you peddle. Remember, all of the people who use these online licenses also run a SharePoint environment behind the scenes. 

Brass Contributor

The 2nd FAQ question has no link for the test "You can find these limits here.".

Q: Are there any limits on what .mpp files I can import through the API? 

A: The normal Project for the web limits apply to imported .mpp files. If you attempt to import a .mpp file that violates these limits, you will see an error when importing. You can find these limits here.  

Steel Contributor

According to https://www.microsoft.com/en-US/microsoft-365/roadmap?featureid=72195 the GUI import option should be out in next 10 days. Any idea if that will be pushed? Is there a way to link the desktop and Project for the Web so that users with only web licenses can use that and those with full licenses can use desktop?

Copper Contributor

do I need to be a dynamic admins and have a project online license to run this?

 

Edit: NVM end users can now import via the interface on my tenant.

Steel Contributor

I see the status of GUI import is rolling out now. Will there be an announcement once it is done?

Copper Contributor

I really like the .mpp import feature recently added.  Was hoping we could choose and existing project to load the file into as I had already defined columns, resources, ...  

once loaded I had to copy and paste the tasks into my plan. 

Thanks

Steel Contributor

I am not seeing the import feature. I am looking at https://project.microsoft.com/ can someone share where to find it?

Version history
Last update:
‎Mar 17 2021 09:24 AM