Sharepoint permission scopes

Describe the problem/error/question

In n8n cloud I am trying to create a sharepoint credential, whan i get to the Connect to my account button and i click it, it asks me for admin approval, send the link to the admin, but thy are concerned about the too broad permissions requested, see below:

How could i narrrow down the permissions, a solution like in the Microsoft Entra ID accounts Enabled scopes would be handy, but i do not find any solution.

Information on your n8n setup

  • n8n version: Version 1.113.3
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud

hello @Andor_Szabo

The SharePoint node can’t narrow down the permissions. You should use the HTTP node instead

1 Like

I found a solution:

  1. First you go to your n8n dashboard/project and you add a credential.

  2. For “Select an app or service to connect to” select “Microsoft OAuth2 API”

  3. Name the credential something like “Sharepoint Permissions”

  4. For scopes, copy in Sites.Read.All Sites.ReadWrite.All SearchConfiguration.Read.All SearchConfiguration.ReadWrite.All

  5. Click the “Connect Account” button.

  6. Ensure you are using a MS tenant admin account. This won’t work if you don’t have the right permissions.

  7. n8n will request the correct scopes that were missing before.

  8. Once the connection is successful you can open up a workflow, add a Sharepoint node and create new credentials. This time, because the scopes were added already, you won’t run into the error 403 problem.

The issue is that the official Sharepoint Node does not automatically add the right scopes (or give you the option to do so) when you create a credential through there. This method circumvents that and adds the scopes that are needed so you can use the official Sharepoint n8n node.

1 Like

Hi Andor, I have a similar issue, what solution did you use in the end? Thanks, Conor.

Hi i have used custom http request, which had its own problem set regarding the authorization in my case, but my devops colleague solved it working closely with the clients sys admin, and it turned out to be a good choice in the end, because i have more control thrugh microsofts Graph API, like, i can insert just a row in an excel table etc.