Node-RED to sharepoint (Solved)

#1

Hello Every one!
I am try to save data to sharepoint list, but gets this error. any solution or ideas
image
has any one done something like this.
thanks in advance

0 Likes

#2

Hi @weky - I'm not sure anyone here can say anything more than the error message does - You do not have permission to perform this action or access this resource

Have you checked your credentials etc?

0 Likes

#3

@knolleary
Hi thanks, but i have checked my credentials and permissions. every thing is good on that side.

0 Likes

#4

Try googling sharepoint error code and the number...

0 Likes

#5

@weky what connection method are you using (i.e. rss, odata or the soap api) and what authentication are you using?

I haven't used SharePoint with Node-Red in particular, but getting SharePoint authentication to work with out the Sharepoint client libraries can be tricky.

0 Likes

#6

i was using basic auth but it was not working
image
but I have solved it by registering an app on SharePoint tenant. and then used app ID and secret to get access token. then sent access token in the header.

0 Likes

#7

Nice work!

The SharePoint API doesn't support Basic Authentication by default (you can force it on Premise by hacking IIS, but I don't think there's anyway to make it work with SharePoint Online).

0 Likes

#8

Correct, sorry I missed this so couldn't respond in time. SharePoint Online requires "modern authentication" generally OAuth.

I would be very interested in a working example (without the authentication details of course) since SharePoint Online is something we use a lot at work. Having a working example to update a list from Node-RED could be quite handy.

0 Likes

#9

I have not checked this myself, but there is an api to ms online called ms graph. I just descovered there is a node called node-red-contrib-viseo-ms-graph that can use this api to i.e sharepoint (OAuth2 Authentication). I think you then can insert/read data from a sharepoint list (or any other ms online application)

Data is sent recived as JSON

Ola

0 Likes