REST API INTEGRATION WITH SHAREPOINT Online (Without OOB SPOKE)

GB14
Kilo Patron

We’re working on integrating ServiceNow with a SharePoint Online list (without using the SharePoint spoke). Has anyone successfully done this and can share the steps or point us in the right direction?

 

We’re able to obtain the OAuth token successfully, but we’re running into issues when trying to create or update a list item.

 

The error from the logs is:

 

*** Script: SharePoint API call failed. Status: 401 Response: {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"}}}: no thrown error

 

Any guidance would be appreciated.

12 REPLIES 12

SD_Chandan
Kilo Sage

Hi @GB14  & Community Members,

I am also lit bit same requirement can you please let me know if it is possible ......!
requirement ;- 
Is it possible to fetch the owner (or user with full access) of a specific SharePoint folder using an API, and then trigger an approval to that user from a ServiceNow catalog item?




Thank you
Chandan

are you able to authenticate? We are able to get the tokens but our auth is failing for some reason. 

Hi @GB14 ,

I just want to check the feasibility and see if I’m able to do it or not.

If it is possible then i'll try and let you know.

Thank you
Chandan

Ankur Bawiskar
Tera Patron
Tera Patron

@GB14 

the error clearly says access denied.

Seems permission issue for the API user you are using and doesn't have Create/Update access in sharepoint folder.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader