I am building a workflow to read and write (update) data in an Excel spreadsheet (VIGILÂNCIA ELETRÔNICA.xlsx) located on a Corporate SharePoint Online Group Site.
The native Excel node is unusable as it is limited to accessing OneDrive personal files (due to restricted Scopes). Therefore, we are using the HTTP Request node with a custom credential.
1. Current State and Permissions
We have eliminated all syntax and fundamental permission issues.
-
Node Used: HTTP Request (to bypass the native Excel node).
-
Credential:
Microsoft OAuth2 API(Used to inject required Scopes). -
API Permissions: Our I.T. team granted Admin Consent for the maximum available scope:
Sites.FullControl.All. -
URL Syntax: The path is correctly encoded (
encodeURIComponent) and uses the exact folder structure.
2. The Unresolvable Error
Despite having maximum permission, the Microsoft server is blocking the core read/write operation.
-
Working Request (Metadata Read):
The URL without the /workbook/ command returns a 200 OK JSON with the file’s metadata.- Conclusion: The credential has full file access.
-
Failing Request (Spreadsheet Read/Write):
Any request that uses the spreadsheet processing service (/workbook/) fails immediately.- Example Failing URL:
Plain Text
https://graph.microsoft.com/v1.0/drives/.../VIGIL%C3%82NCIA%20ELETR%C3%94NICA.xlsx:/workbook/worksheets('2025')/usedRange(valuesOnly=true)
- Error Output:
JSON
Plain Text
{
"errorMessage": "Forbidden - perhaps check your credentials?",
"errorDescription": "Could not obtain a WAC access token.",
"errorDetails": {
"rawErrorMessage": ["403 - \"{\"error\":{\"code\":\"AccessDenied\",\"message\":\"Could not obtain a WAC access token.\"...}}"]
}
}
3. Questions for the Community
The error Could not obtain a WAC access token (WAC = Web Access Companion) means the Excel Online Service is refusing to authorize our application’s token, even with the maximum Sites.FullControl.All permission in Azure AD.
-
Has anyone successfully overcome this
403 WAC access tokenconflict in a corporate SharePoint Online environment? -
Is there a known secret API permission (e.g., related to the
Workbookservice or a different resource) that we must ensure is delegated or application that is not covered by theSites.FullControl.Allumbrella? -
Are there any specific HTTP Header parameters N8N needs to send to satisfy the WAC token requirement?
Any insight into bypassing this Microsoft service layer block would be greatly appreciated.