Permission issues trying to add projecetserver scope or access _api/ProjectData/* via HTTP Requests using Bearer Token

Viewed 179
  • Our server has Single-Sign-On, when I manually login, and go to below URL (in chrome) I am to get Projects XML OData Feed https://{server}.sharepoint.com/sites/pwa/_api/ProjectServer/Projects
  • I need to take this data and manually save the file to run my python scripts. This becomes a nightmare as I need to download all the relational data (resources, assignment, etc. ) to get the full scope of things
  • I would like to do this via python GET requests. I have done the below steps, but now stuck with the following error and do not know how to overcome it:
  • HTTP RESPONSE: 403
    {'odata.error': {'code': '-2147024891, Microsoft.Office.Project.Server.Exceptions.ProjectServerUnauthorizedAccessException', 'message': {'lang': 'en-US', 'value': 'User could not be authenticated because logon permission has not been granted'}}}

Steps I've taken to get REST API Access:

  1. PWA is set to "Project Permission Mode"
  2. Use the following site to create AppId: https://{server}.sharepoint.com/sites/pwa/_layouts/15/appregnew.aspx
  3. Register the application and define the scope using the following url: https://{server}.sharepoint.com/sites/pwa/_layouts/15/appinv.aspx
  4. The Request XML I used is the following: <AppPermissionRequests AllowAppOnlyPolicy="true"><AppPermissionRequest Scope="http://sharepoint/projectserver" Right="Manage" /></AppPermissionRequests> however, when I press CREATE, I am presented with the following landing page: "Sorry, you don't have access"
  5. I tried scopes: Scope="http://sharepoint/projectserver/project" Right="Read", same issue as above
  6. Finally, I applied: <AppPermissionRequests><AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl"/></AppPermissionRequests> and the App was registered
  7. However when it came time to accessing the URL for the project. I am presented with the HTML response I outline above. (Please note that I am getting the Bearer Token successfully, as I am able to hit the following url and get the web list: https://{server}.sharepoint.com/sites/pwa/_api/web Response: 200)
  8. I assume whatever permission is preventing me to register the projectserver scope is what is causing me the error. However, I have added myself to all the Permission groups, but still not able to add the projectserver scope.
  9. Are you able to highlight some steps, and possible issues I might be able to take to our sharepoint team to resolve?
1 Answers

I used the following package and instructions:

Related