Project Online API Usage: authentication challenge

Philipp Reske 116 Reputation points
2021-11-28T16:02:07.017+00:00

Good evening,

I am now struggeling for the past hours to get a use case up and running: I need to retrieve (read-only) the assigned resources for a project task.

The only neutral way I found to accomplish this so far is through ODate REST API which listens like this

http://ServerName/ProjectServerName/_api/ProjectData/Projects

More precisely my query is the following

"https://" + sharepoint_url + "/sites/pwa/_api/ProjectServer/Projects('" + project_id + "')/Assignments('" + project_task_id + "')/Resource"

Now what I am challenges with, is the right authentication.

I am trying to impersonate two natural users, the application is registered in AAD and I also get a token.

But I get either one of the two errors

{"error_description":"Unsupported security token."}

or

{"error_description":"Exception of type 'Microsoft.IdentityModel.Tokens.AudienceUriValidationFailedException' was thrown."}

I am happy to provide further details, but I am a bit lost in the API jungle from Microsoft. Unfortunately it appears that Graph API does not (yet?) support Project Online.

Community Center Not monitored
0 comments No comments
{count} votes

Accepted answer
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-11-29T01:43:55.333+00:00

    Hi @Philipp Reske ,
    Currently, Microsoft Q&A supports the products listed over here: supported topics (more to be added later on).

    Your question about Project is not supported yet now. You could ask about this in Project forums.
    https://techcommunity.microsoft.com/t5/project/ct-p/Project


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Philipp Reske 116 Reputation points
    2021-11-28T17:47:07.94+00:00
    0 comments No comments

  2. Philipp Reske 116 Reputation points
    2021-12-01T06:46:22.617+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.