Based on the error details and the Microsoft credentials documentation for SharePoint, it looks like the issue is caused by modifying the tenant subdomain when configuring your SharePoint credentials. In n8n, the SharePoint OAuth2 authentication requires you to enter the subdomain exactly as it appears in your official SharePoint URL (for example, if your URL is https://tenant123.sharepoint.com, then your subdomain is tenant123).
Changing the tenant name to “test” makes the resource URL (https://test.sharepoint.com) mismatch the one registered in your Microsoft application. In your application registration in the Microsoft Identity Platform you must either use the actual SharePoint subdomain or update the settings so that the requested resource is valid. The error:
“AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client’s application registration…”
indicates that the resource you're trying to request (with “test”) isn’t among the valid ones (usually the generic SharePoint resource with app ID “00000003-0000-0000-c000-000000000000”).
How to fix it:
-
Use the correct subdomain:
Ensure that in the SharePoint credential, you enter your actual SharePoint subdomain rather than changing it to “test.”
(Refer to the Microsoft credentials documentation where it instructs to “enter the Subdomain part of your SharePoint URL.”)
-
Review your Application Registration:
Verify that your application registration in the Microsoft Identity Platform includes the correct resource URI and permissions. If you wish to test with another tenant, you need to update the app’s valid resources accordingly.
-
Check OAuth callback and settings:
The “Insufficient parameters for OAuth2 callback” error may also hint at a mismatch between the registered callback URL and the one being used. Double-check that your OAuth callback entered in n8n is exactly what you registered in the Microsoft Application Registration Portal.
Following the steps detailed in the documentation should help resolve the issue:
- Verify and reset the SharePoint Subdomain to the correct value.
- Confirm your Azure AD app's registered resources match the expected defaults for SharePoint.
With these adjustments, your OAuth flow should be able to complete successfully.