Read data from Excel in Sharepoint

Describe the problem/error/question

I want to do something that should be in theory “simple” but after trying for 2 days I simply cannot find a way.

I just want to read data from a business SharePoint. The current set up is as follows:

I have tested with HTTP node, HTTP SharePoint node, read through MS Graph API docs, watch tutorial videos, read through all posts that were even remotely similar in the community, but I still cannot crack this nut.

Accessing the files under my corporate account “[email protected]” works fine.

What is the error message (if any)?

I have been getting different errors at different stages of the processes. From things like “Forbidden: check your credentials” to missing refresh tokens.

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.91.3
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own, main
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Windows 11

Have you created the requisite app registration within Entra on MS admin, with delegated permissions and whatnot? You’ll need to make sure you’ve granted delegated permissions to the correct scopes. I use the graph api to pull data out of sharepoint excel files using this.

In n8n itself, make sure your scopes for your MS Oauth2 credentials setup are space-separated.

Hi, thank you for your reply.

Yes, this was one of the things I was working with but I was not able to figure it out entirely.

I tried following this tutorial: Getting Microsoft OAuth Credentials for n8n - YouTube

The options that I used are the following:

  • Supported account types: Organizational + Personal
  • Redirect URI: not really sure how to fill this one up so I kept it empty
  • API permisions:
    • Microsoft Graph > Delegated Permissions > Files.Read.All
    • Microsoft Graph > Delegated Permissions > Files.ReadWrite.All
  • Lastly I created a Client Secret.

After that I tried to configure a Generic OAuth2 token with the ClientID, Tenant, Secret… but never got it to work.

I am also dont have much experience navigating the MS Graph API which makes it all even more difficult.