Aspose.Task to save project into Project Server (C# .NET)

@Rajeshrv,

I have observed the scenarios shared by you and we need to investigate them further. A new ticket with ID TASKSNET-4118 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Team,
Could you please confirm when the fix will be available.

Thank you.

@Rajeshrv,

I regret to share that at present the issue is not resolved. We request for your patience and will share good news with you as soon as it will be fixed.

@Rajeshrv,

Can you please try using latest Aspose.Tasks for .NET 20.7 in your environment and share with us if things are resolved.

@mudassir.fayyaz
I just tested with 20.07 dll, all the 3 scenarios which I mentioned above, shows the same set of errors.

image.png (6.5 KB)
Please check the attached image for dll which I was testing with.

Thank you.

@Rajeshrv,

Can you please share the details of the issue after using latest version so that I may link with our issue tracking system. To reiterate, I have requested you for testing TASKSNET-4118, which is related to exception being thrown on saving project.

@mudassir.fayyaz
Yes I was trying to verify TASKNET-4118, and below are the errors messages for each of the scenarios mentioned earlier.

Scenario 1:
Cannot connect to the specified host. Please check that ‘SiteUrl’ property of ProjectServerCredentials is set correctly.

at #=zXijdOOwwV1QOdCy6UwwufL8LJASuwpl18A==.#=zYLcCvw_jzj0D(String #=ztuljiR0=, String #=zer5m$Ys=, String #=zwIBrJQQ=)
at #=zh9BGRJoFbNLO63MIljYbBzm0IyET8lpj2gtFVKg=.#=z3cGgxuO9bK6g(Boolean #=zor_gBHU=, Boolean #=zCeJE4Fo=, String #=z_8bRkHIxIeV$)
at #=zdpUFiPIkHDJ_9UNCm9ME4VMShkE6fIwPg44HCq_fHa63.#=zXdf2hzk=(Project #=zqNwos1w=, ProjectServerSaveOptions #=zTNGpCNfNQQrI, Boolean #=zor_gBHU=)
at Aspose.Tasks.ProjectServerManager.CreateNewProject(Project project, ProjectServerSaveOptions saveOptions)
at Aspose.Tasks.ProjectServerManager.CreateNewProject(Project project)

Scenario 2 :
Aspose.Tasks.ProjectOnlineException: ‘Cannot connect to the specified host. Please check that ‘SiteUrl’ property of ProjectServerCredentials is set correctly.’
project’s calendar guid should be set to non-empty value.

at #=ziwJ48X_eC_$bVH4$Qc8hLWUICJ4tt1T419Fie3haJCAWCUueBw==.#=zYqTiufZhXuaC(Project #=zqNwos1w=, List1 #=zUDuFWKY=) at #=zO2ecNxUig6hiV7ZwQubpoaWeIRBdv7lpNQslQjUum0cRyzoU9g==.#=zjAjVCydbOjx2(List1 #=zUDuFWKY=, Project #=z3NL1bSKQJrJZ)
at #=znzcItASyYgqWWUp$RmlDRcYkvwHwS4UYV4fELGzO10ADah3Roa0xfk8=.#=zZKPkFYmegIbn(#=za7TnQX8= #=z3NL1bSKQJrJZ, List`1 #=zUDuFWKY=)
at #=zUn8SQ3FxuUz$pSY132nidNE0eCrQOXIp8bbXphFz_jmi.#=zm4fl7d1Lric$(Project #=zqNwos1w=, MemoryStream #=zWIvwpXU=)
at #=zdpUFiPIkHDJ_9UNCm9ME4VMShkE6fIwPg44HCq_fHa63.#=zXdf2hzk=(Project #=zqNwos1w=, ProjectServerSaveOptions #=zTNGpCNfNQQrI, Boolean #=zor_gBHU=)
at Aspose.Tasks.ProjectServerManager.CreateNewProject(Project project, ProjectServerSaveOptions saveOptions)
at Aspose.Tasks.ProjectServerManager.CreateNewProject(Project project)

Scenario 3 :
Failed to retrieve auth token. Unexpected structure of security token response.
Aspose.Tasks.ProjectOnlineException: ‘Failed to retrieve auth token. Unexpected structure of security token response.’

at #=zXijdOOwwV1QOdCy6UwwufL8LJASuwpl18A==.#=zWlfWck1a9kjg(Stream #=zeBtaUZw4infc)
at #=zXijdOOwwV1QOdCy6UwwufL8LJASuwpl18A==.#=z2Uj3q1h0mEE1(String #=zXprJwkHA1xb2NfHwAaIiMiA=, String #=zLUggIRI=, String #=zS0UB_2Y=)
at #=zXijdOOwwV1QOdCy6UwwufL8LJASuwpl18A==…ctor(ProjectServerCredentials #=zx76633U=, #=zYQxjJZZtXWz0e3sHFcEMZ14SnufHBIFKlDnmrdA= #=zO8JWtOstu6Nk)
at #=zXijdOOwwV1QOdCy6UwwufL8LJASuwpl18A==…ctor(ProjectServerCredentials #=zx76633U=)
at Aspose.Tasks.ProjectServerManager…ctor(ProjectServerCredentials credentials)

Please let me know if you need more details.

Thank you.

@Rajeshrv,

Thank you for sharing the updates. We will share feedback with you as soon as possible.

@Rajeshrv.

Can you please try using latest Aspose.Tasks for .NET 20.8. In case there is still an issue then we request you to please provide USERNAME, PASSWORD, DOMAIN, USERNAMEREADER and USEREADERPASSWORD that we may use to verify the issue further on our end.

@mudassir.fayyaz
Unfortunately am unable to proceed with 20.8 dll as well.
Here are the additional details you have asked for
USERNAME= “alfaproject”, PASSWORD = “Z9MmVRa7uU2k”, DOMAIN=“daedmz”, USERNAMEREADER=“daedmz/alfaproject” and USEREADERPASSWORD is same as PASSWORD.

Thank you.

@Rajeshrv

I have associated the information in our issue tracking system and will share the feedback with you as soon as the issue will be addressed.

@Rajeshrv

During investigation, we have observed that you are trying to connect to instance of Project Server located at your network: http://MSSERV16. The exception tells that we don’t have an access to this machine. Can you please try using latest Aspose.Tasks 21.1 on your end and share feedback.

@mudassir.fayyaz
Thanks for the update. I just tried executing below lines with 21.1 version of dll.

            string SharepointDomainAddress = "https://sagportal.sharepoint.com";
            string UserName = "myuser";
            string Password = "mypass";
            var aCredentials = new ProjectServerCredentials(SharepointDomainAddress, UserName, Password);
            ProjectServerManager manager = new ProjectServerManager(aCredentials); 

it failed immediately and showing this message “Aspose.Tasks.ProjectOnlineException: ‘Failed to retrieve auth token. Unexpected structure of security token response.’”

Thank you.

@Rajeshrv

Thank you for sharing the updates. We will share the feedback with you as soon as the issue will be addressed.

@Rajeshrv

Can you please try using latest Aspose.Tasks for .NET 21.2 on your end and share your feedback.

@mudassir.fayyaz
I just tried using 21.2, and now I get this message

"Project server authorization failed. Server returned the following error: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access ‘’.

Thank you.

@Rajeshrv

Thank you for sharing the feedback. I have updated the information in concerned ticket and will get back to you as soon as possible.

Dear Team,
Could you please provide me updated directions on this topic.

Thank you.

@Rajeshrv

I regret to share that at present the issue is still unresolved. We request for your patience and will share the good news with you as soon as the issue will be fixed.

@Rajeshrv

We have investigated the requirements further. Aspose.Tasks currently uses Legacy authorization to connect to Project Online. You should make the following changes in Azure configuration:

Sign in to the Azure portal as a security administrator, Conditional Access administrator, or global administrator:
https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade

  1. Ensure Multifactor Authentication is turned off for current user:
    Microsoft Azure → Multi-Factor Authentication → Check “MULTI-FACTOR AUTH STATUS” column for the user.

  2. turn off Security defaults:
    Microsoft Azure → Properties → Manage Security defaults > Enable Security defaults → No

Please try the suggestions on your end.