- Our
server
has Single-Sign-On, when I manually login, and go to below URL (in chrome) I am to get Projects XML OData Feedhttps://{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 don't 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:
- PWA is set to "Project Permission Mode"
- Use the following site to create AppId:
https://{server}.sharepoint.com/sites/pwa/_layouts/15/appregnew.aspx
- Register the application and define the scope using the following url:
https://{server}.sharepoint.com/sites/pwa/_layouts/15/appinv.aspx
- 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"
- I tried scopes:
Scope="http://sharepoint/projectserver/project" Right="Read"
, same issue as above - Finally, I applied:
<AppPermissionRequests><AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="FullControl"/></AppPermissionRequests>
and the App was registered - 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
) - 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.
- Are you able to highlight some steps, and possible issues I might be able to take to our sharepoint team to resolve?