Skip to Content
0

How to use OAuth with Sender Rest adapter in SAP PO?

Apr 21, 2017 at 09:52 AM

336

avatar image

Hi Guyz,

Need your expert advice to implement a scenario in SAP PI (7.4).

Scenario is Rest -> PI -> RFC (with OAuth2 on sender side).

I have gone through blogs given by Ivo Kulms, Alexander Bundschuh and few others also but couldn't find anything on how to implement OAuth based authentication on sender Rest adapter.

Even if we hard code the token for the sender partner that will work.

Any helpful link or direction will be appreciated!!

Thanks in adavance!!

Gaurav

10 |10000 characters needed characters left characters exceeded

I'm still looking for the solution.

Any help/direction will be appreciated!!

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Manoj K Apr 26, 2017 at 09:38 AM
0

Gaurav,

The only possible available OAuth auth is through SAML or Concur. i am not so sure if the refresh token or hard coding the token will work in this case.

https://blogs.sap.com/2015/11/23/pi-rest-adapter-connect-to-concur/

The refresh token / hard code etc are available in third party's Advantco Rest adapter.

Br,

Manoj

Show 5 Share
10 |10000 characters needed characters left characters exceeded

Hi Manoj,

Thanks for replying!!

But, I have already gone through this blog and it talks about how to setup OAuth with rest receiver channel.

My scenario is sender Salesforce will send the data to PI via Rest (PI needs to authenticate using OAuth).

And PI sender rest adapter won't be polling in this scenario and it will be a direct Post executed from Salesfoce.

Is this possible in PI (setting OAuth on sender Rest) and if yes, how?

Thanks,

Gaurav

0

Gaurav,

OAuth is possible from sender channel in "Polling Mode" not in "Listening Mode" and again as i said SAP does provide OAuth via Concur and SAML only.

And also as you mentioned

this scenario and it will be a direct Post executed from Salesfoce

By this sentence it makes sense that you sender adapter would be in Listening Mode , in this mode why do you need auth the sender will be directing the messages to PI system.

In case if it was PI picking data from salesforce via sender adapter through polling mode then you need to go for Oauth auth.

Br,

Manoj

0

Manoj, I think we both are on the same side while debating for this requirement.

I also questioned why do we need the authentication at all, as receiver (which in this case is PI) generally decides what kind of authentication and permissions should be given to any logging user.

But, it is the client, who is adamant as of now to have it and is asking whether PI can support such scenarios.

Anyways, thanks for your help Manoj - it reinforced my statement while I go back to my client :)

1

Gaurva ,

Addition to what i said salesforce does have polling mechanism too in which case PI system does need to login into Salesforce and pick the data, so i believe your client is talking about this.

Br,

Manoj

0

Nope, as I mentioned earlier, PI will expose/provision the Rest service (already clarified this).

There will be a submit happening in salesforce which will send a post message to PI.

1