Forum Discussion
Access Denied when making Project Online API call
Hello rohanw24 ,
The Azure AD permissions don't grant access to Project Online. Typically access to Project Online can be via:
SharePoint Azure ACS using the SharePoint client ID and secret but for some Project Online APIs, you will need to provide a username and password as part of the auth. You could use the SharePointOnlineCredentials class to help auth. These code samples might help: https://github.com/OfficeDev/Project-Samples
Here is a Stack overflow post with a similar query - they went with the SP credentials class too: https://stackoverflow.com/questions/42521163/how-to-get-an-acs-app-only-access-token-for-project-online
Hope that helps
Paul
Hi Paul_Mather,
Thank-you for your reply. After using ReST.ps1 file for authentication, I'm now able to get Fed Auth ticket, Cookie, and Digest Value. Now I want to make an ReST API request to the project server endpoint through cURL. For example,
https://example.sharepoint.com/sites/PWA/_api/ProjectServer/Projects
What data/parameter I must include in the request header to ensure that I receive a valid response without Access Denied error?
Thanks & Regards,
Rohan