Skip to Content

Requirement

This blog is to demonstrate How Advantco REST Adapter can be used to retrieve or place file in the SharePoint server using Microsoft Azure Integration.


REST (Representational State Transfer) is a software architecture style for designing client-server applications based on HTTP which is less complex than the SOAP (Simple Object Access Protocol) approach.


SharePoint is a web application framework and platform developed by Microsoft that integrates intranet, content management, and document management.

The Microsoft Azure Platform provides an API built on REST, HTTP, and XML that allows a developer to interact with the services provided by Microsoft Azure. Microsoft also provides a client-side managed class library which encapsulates the functions of interacting with the services.


The Advantco REST adapter for SAP PI enables system integration between SAP and NON SAP backend systems to connect, retrieve or place file in any SharePoint folder based on the REST along with OAuth which is an open standard for authorization.


Configuration Required

The major challenge that was faced while achieving this integration involves configuration of the Authentication, to connect to the share point site. This could be overcome by retrieving a refresh token which would be used by the REST adapter to retrieve the access token, which in turn is used by the Adapter.

The following are the steps that has to be performed to achieve the goal:


Go to the URL

https://login.windows.net/<tenant_id>/oauth2/authorize?response_type=code&client_id=<client id>

Get Code from URL

                Login and then get the URL. Copy it into a notepad and collect the <CODE>

Get the Refresh Token

Now use the Advantco REST Client to access the rest of the information.

  /wp-content/uploads/2015/03/1_667452.png
  

Channel Configuration

Use the above token to create the channel configuration:

Authorization Grant Type

Refresh Token

Client Id

<client id>

Client Secret

<client secret>

Token Endpoint

https://login.windows.net/<tenant id>/oauth2/token?client_id=<client id>&client_secret=<URL-encoded client secret>&resource=<App ID>

Refresh Token

<Refresh token obtained above>

Scope

  /wp-content/uploads/2015/03/2_667453.jpg
  

Testing

A file present in the SharePoint folder would be retrieved and brought into the PI system:

/wp-content/uploads/2015/03/3_667466.png

File that would be used:

/wp-content/uploads/2015/03/4_667467.png

Channel used:

/wp-content/uploads/2015/03/5_667468.png

Screenshot from the SXMB_MONI showing the message:

/wp-content/uploads/2015/03/6_667469.png

The file present in the SAP Folder:

/wp-content/uploads/2015/03/7_667470.png

Summary

Connection to SharePoint can be complex because of the Microsoft Authentication Mechanism. Advantco REST Adapter reduces the complex integration process with Microsoft Azure/Sharepoint to simple configurations steps without any custom development.


Referances

For more details on Advantco REST Adapter, please refer: http://scn.sap.com/community/pi-and-soa-middleware/blog/2011/11/08/rest-adapter-for-netweaver-sap-pi

For the Advantco Rest Adapter website, please refer: https://www.advantco.com/product/REST

To report this post you need to login first.

2 Comments

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

  1. Eng Swee Yeoh

    OAuth 2.0 was also the reason why we went for Advantco’s REST adapter as well. Hoping that SAP’s own REST adapter will eventually have comparable functionality in the future. Until then, Advantco’s adapter is a great solution which simplifies the authentication process – it would have been really messy to have to code a custom module to authenticate prior to the HTTP call.

    Overall, nice blog, Anupam 🙂 Thanks for sharing about this. Now there is a reference point for those looking for integration with Sharepoint.

    (0) 
  2. Shan *

    Hi,

    Does the web service have to be configured by a SAP Basis person or can it be done by a Developer?

    Also would you be able to help me on what checks/configurations need to be done to get the Web Service to work?

    I am currently trying to consume a SharePoint Web Service, and I am new to SAP.

    Thank You,

    Shaneel. 

    (0) 

Leave a Reply