Error when accessing Project Server through Postman using Bearer authentication

alexandre Girard-Gagnon 1 Reputation point
2022-11-01T19:58:07.437+00:00

I'm trying to access our project web app using Project Server's REST API.

I have already went though the configuration from Registering a new App : https://tenant.sharepoint.com/sites/pwa/_layouts/15/appregnew.aspx
Then, I created the authorization settings https://tenant.sharepoint.com/sites/pwa/_layouts/15/appinv.aspx with this XML Permission Request.

<AppPermissionRequests AllowAppOnlyPolicy="true">  
   <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" />  
</AppPermissionRequests>  

I was easily able to retrieve the Bearer Token for the request in Postman, so I guess the above steps worked fine.
256157-image.png

The issue comes in when I try to access any of the endpoints using the given Bearer Token : {{site_url}}/_api/ProjectServer/{{some_endpoint}}
(I've also tried using ProjectData instead of ProjectServer, but no luck either)

When I click Send I received the following message

{  
    "error": {  
        "code": "-1, System.InvalidOperationException",  
        "message": {  
            "lang": "fr-FR",  
            "value": "User:<customercontent></customercontent> not found in Active directory or in project db."  
        }  
    }  
}  

Here is the setup of my HTTP Request in Postman
256144-image.png

I've literally checked every thread about the subject, but I can't seem to find any workaround. Have I missed a step? It seems like the authentication is trying to find a user in AD or in the Project Database instead of using the Bearer authentication. I've tried entering this URL in a browser AFTER I authenticated with my Microsoft account, and it worked.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,026 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,591 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 32,636 Reputation points Microsoft Vendor
    2022-11-02T02:18:42.44+00:00

    Hi @alexandre Girard-Gagnon
    Since your issue is about Project and our forum focus on SharePoint. I will recommend you to go Project Tech Community for some more professional advice. Here is the forum dedicated to Microsoft Project issues. If you have any issues about SharePoint in the future, please not hesitate to raise a ticket in our forum.
    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.