Fix Project Online App-Only Authentication Access Denied Error
Question details
A console application gets Access Denied errors when using SharePoint app-only tokens for Project Online.

- Product
- Project Online
- Device & OS
- not provided
- Scenario
- Accessing Project Online data via a console application using CSOM and the ProjectData REST API with a SharePoint app-only token.
- Observed behavior
- The application connects successfully with a username and password but returns 'Access Denied' or 'user-not-found' errors when switching to an app-only token.
Ensure you have SharePoint administrator privileges to modify tenant-level app permissions and verify your console application uses the latest Microsoft.SharePointOnline.CSOM packages.
Configure Explicit App-Only Permissions for Project Web App (PWA)
Grant explicit permissions to the application within Project Web App, as standard SharePoint site permissions do not automatically cover Project Online data.
SharePoint app-only permissions that work for standard sites and lists do not necessarily grant access to Project Online project data. You must verify the authentication model, tenant configuration, and ensure PWA permissions are specifically assigned to the app principal.
Navigate to your SharePoint Admin Center and generate an App ID and Secret via the AppRegNew.aspx page.
Go to the AppInv.aspx page to grant the application tenant-level permissions. Ensure the Permission Request XML explicitly requests Project-level access scopes.
Log in to Project Web App (PWA) as an administrator and navigate to PWA Settings from the gear icon.
Go to Security > Manage Users and verify or add the app account (service principal), ensuring it is assigned to the appropriate security groups with Project access rights.

Consult Microsoft Developer Forums for Code Debugging
If configuration updates fail, leverage developer communities to debug the token flows and CSOM execution.
Manage Your Projects Effectively with WPS Office
While specialized API integration requires Microsoft Project Online, you can handle day-to-day project planning, task tracking, and team collaboration smoothly using WPS Office. It provides powerful Spreadsheets and Documents that serve as a lightweight, fully compatible alternative to Microsoft Office.
- 1. Download and Install: Download WPS Office from the official website and complete the quick installation.
- 2. Open a Project Template: Launch WPS Spreadsheet and search for 'Project Planning' or 'Gantt Chart' in the free Template library.
- 3. Track and Share: Easily track tasks, resources, and timelines, then save your files in .xlsx format for seamless sharing with external stakeholders.

Frequently Asked Questions
Why does my console app work with a username and password but fail with an app-only token?
Username and password authentication runs under a specific user context that already holds PWA permissions. App-only tokens authenticate as a service principal, which must be explicitly granted access to Project Online resources separate from standard SharePoint sites.
Can I use standard SharePoint app-only permissions for the ProjectData REST API?
Standard SharePoint site or list app-only permissions are generally insufficient for accessing Project data. The token audience and API permissions must be explicitly configured and supported for Project Online.
What information should I include when posting a question to the Microsoft developer forum?
To get the best help, include your token flow, requested permission scopes, endpoint URL, the exact CSOM or REST API call you are making, and the complete error message. Always redact client secrets and personal information.




