Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
dilipkkp2412
Contributor
16,973

Overview:


Here, we will see how we can integrate with SharePoint to Read/Write data using SAP-PI techniques without REST-Adapter.

We can interact remotely with SharePoint data using any technology/platform which supports REST (Representational State Transfer service) web requests.

SharePoint provides specific REST-API-protocols which can be used for data exchange with SharePoint. We can perform CRUD operations (Create, Read, Update, and Delete)

A RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data (real time data exchange over internet).

For any data exchange with SharePoint via respective REST-API, we need to follow following steps:

  1. Get “SharePoint access token” for authroization

  2. then perform CRUD (create/Read/Update/Delete) operations using POST/GET/PUT/DELETe methods.


For authorization, to fetch “SharePoint access token”, we need following SharePoint details:

  1. Client-Id or App-Id:          Client ID is a GUID for the SharePoint Add in

  2. Tenant-Id:                        Tenant ID is SharePoint Online Site Realm

  3. Client-Secret:                  Client Secret is the password for the add-ins.


And while fetching "SharePoint Access Token", we may get following permission issue:

  • "Access denied. You do not have permission to perform this action or access this resource"


To resolve above issue/error, we need to provide "Write" permission to our SharePoint client-id/app-id with below xml input in SharePoint:


  • <AppPermissionRequests AllowAppOnlyPolicy="true">
    <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="Write" />
    </AppPermissionRequests>



and to do this (granting write-permission) in SharePoint site for our client-id/app-id, we can follow following Microsoft-help-link and screen:

 

In SAP-PI where REST Adapter is not available (say till version SAP-PI 7.1), then without REST-Adapter, following techniques can be used in SAP-PI to consume SharePoint-REST APIs for data Exchange:


  1. Using SAP-PI Java UDFs (User defined functions)





  2. Using SAP-PI Java Maps





 

Please Note:

  • The purpose of this blog is to club all my blog's info written for SharePoint integration.

  • This blog will be kept on updating with new SharePoint techniques using SAP-PI as soon as it comes in my integration journey path

  • Next plan is try "OAuth 2.0 authentication" using std. REST Adapter


....to be continued

6 Comments
Labels in this area