Вы находитесь на странице: 1из 4

3/19/2020 Integrate SharePoint using SAP PI | SAP Blogs

Community

Ask a Question Write a Blog Post Login

Dilip Kumar Krishnadev Pandey


August 26, 2018 2 minute read

Integrate SharePoint using SAP PI


Follow RSS feed Like

0 Likes 3,620 Views 1 Comment

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 speci c 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:

Granting access using SharePoint App-Only


page section, where “FullControl” is been given, here only “Write” permission is required

https://blogs.sap.com/2018/08/26/integrate-sharepoint-using-sap-pi/ 1/4
3/19/2020 Integrate SharePoint using SAP PI | SAP Blogs

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 de ned functions)

Inside Graphical Mappings, we can write UDFs to Read/Write data in SharePoint with respective SharePoint-REST API’s consumption.
For any Read/Write event, rst we need to fetch SharePoint-Access token for Authentication to SharePoint and next, we can use Respective
SharePoint-REST for Read/Write events.
To fetch “SharePoint Access Token”, which is required for authentication of SharePoint’s CRUD REST-APIs, following blog’s UDF example
can be used:
Get SharePoint AccessToken using SAP PI UDF

To write any data inside SharePoint, following blog’s UDF example can be used:
Insert items in SharePoint using SAP-PI UDF

To read SharePoint data, following blogs’ UDF example can be used:


Read SharePoint items using SAP PI UDF

To create/Read les into/from SharePoint, following blog’s UDF examples can be used:
Create, Read le in SharePoint using Java (SAP PI UDF)

2. Using SAP-PI Java Maps

We can write custom Java Programs to consume SharePoint REST-APIs for Read/Write operations, these program can be used in SAP-PI
interfaces.
Following are the few SAP-PI JavaMap examples where di erent operations are been performed as per di erent business requirements via
consuming respective SharePoint REST-API’s
To send PDF les from SAP-ECC’s app directory to SharePoint’s speci c folder location:
Post pdf le in Sharepoint using SAP PI Java Map

To write data into Sharepoint in batch/bulk via single call


SharePoint REST Batch Insert Request using Java

To update data into Sharepoint in batch/bulk via single call


SharePoint REST Batch Update Request using Java

https://blogs.sap.com/2018/08/26/integrate-sharepoint-using-sap-pi/ 2/4
3/19/2020 Integrate SharePoint using SAP PI | SAP Blogs
 

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

Alert Moderator

Assigned tags

SAP Process Integration | SAP Process Orchestration |

Related Blog Posts

Read SharePoint items using SAP PI UDF


By Dilip Kumar Krishnadev Pandey , Oct 05, 2017
Insert items in SharePoint using SAP-PI UDF
By Dilip Kumar Krishnadev Pandey , Oct 05, 2017
Get SharePoint AccessToken using SAP PI UDF
By Dilip Kumar Krishnadev Pandey , Oct 05, 2017

Related Questions

Sharepoint portal integrating with SAP


By Former Member , Oct 11, 2010
sharepoint Integration pi to jdbc
By venky adireddy , Oct 05, 2018

Webservice integration from PI to SharePoint


By Former Member , Jun 16, 2015

1 Comment

You must be Logged on to comment or reply to a post.

ahamad shaik

August 27, 2018 at 6:16 am

Dilip Kumar Krishnadev Pandey

Nice blog keep On 

Like (1)

https://blogs.sap.com/2018/08/26/integrate-sharepoint-using-sap-pi/ 3/4
3/19/2020 Integrate SharePoint using SAP PI | SAP Blogs

Find us on

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

https://blogs.sap.com/2018/08/26/integrate-sharepoint-using-sap-pi/ 4/4

Вам также может понравиться