Describe the problem/error/question - I’m trying to download a sharepoint file with the HTTP Request node, using the Microsoft OAuth 2 API credential type.
What is the error message (if any)? - either a 401 UNAUTHORIZED or an “Invalid Audience” error
I ensured my Azure enterprise app has the following scoped applied and granted:
Files.ReadWrite.All
Group.ReadWrite.All
Chat.ReadWrite
offline_access
Sites.FullControl.All
Sites.ReadWrite.All
When making the credential - I made sure to swap the authorization and token URL with the following (was receiving a “no refresh token” error using the default values):
https://login.microsoftonline.com/TENANT_ID/oauth2/authorize
https://login.microsoftonline.com/TENANT_ID/oauth2/token
and I requested the following scopes when trying different times:
Sites.FullControl.All
Sites.ReadWrite.All
Files.ReadWrite.All
Has anyone had this issue before or have any ideas on how to solve?
Thanks so much
Information on your n8n setup
- **n8n version: 1.20.0
- **Database (default: SQLite): Postgresql
- **n8n EXECUTIONS_PROCESS setting (default: own, main): queued
- **Running n8n via (Docker, npm, n8n cloud, desktop app): EKS
- Operating system:: Linux