microsoft / PowerPlatform-DataverseServiceClient

Code Replica for Microsoft.PowerPlatform.Dataverse.Client and supporting nuget packages.
MIT License
283 stars 52 forks source link

Accessing Project Online Project specific Custom Fields #469

Closed HeinrichvH closed 1 month ago

HeinrichvH commented 1 month ago

Hello Guys,

I have the following issue/question. I would like to access

https://oneproject-prod-torus-weu-azsc-000.project.microsoft.com/pss/api/v1.0/projects( dynamics-org )/tasks/fields

this is the API for retrieving the fields including the project online-specific user custom fields. I analyzed the corresponding request which is done when you open the project page, and it seems like a token is used with the authority of the Power Platform Application User of the Project Online Application: image

If I used the token I extracted from my browser's request, everything works fine. However I am unable to find a way to access this API by using my application, even if I register the App as an application in Azure and also assign the same security roles in the Dataverse Admin Center, I always receive a 401, no matter which rights I give that application.

So it seems this API is only usable by tokens issued by the Application which is used by the Microsoft Project Application User.

Does anyone know how if there is another way to get the project-specific custom fields? I mean the best solution would be to include the Custom Fields which you can create in the Dataverse Table and the Project Online Web View, but currently, this seems not to be supported.

I would be very thankful for any help or recommendations, thank you very much.

MattB-msft commented 1 month ago

That API is for internal use by the project team's applications.
You might look in the graph API though I do not believe they are surfacing their stuff outside of Dataverse for non-system consumption. Your best bet would be to contact them via the custom fields documentation page on learn.