on 2020 Jun 15 4:45 PM
Hi Experts,
I am working on a POC for generating a CPI monitoring report and I need to access MessageProcessingLogs OData API via OAuth.
I have followed the blog for OAuth set up: https://blogs.sap.com/2019/02/14/cloud-integration-inbound-http-connections-using-oauth-client-crede... and it works fine when tested using POSTMAN tool.
I have stored the OAuth credentials in Security Materials and have done OData adapter configuration. When iFlow is deployed. It is failing with "com.sap.gateway.core.ip.component.odata.exception.OsciException: : 401 : HTTP/1.1" error.
I have tried unchecking CSRF protected option and checked my Client Secret multiple times and it has ESBMessaging.send role assigned too.
Any pointers would be a great help.
Regards,
Pavan G
OData Adapter Config:
Request clarification before answering.
Apparently the CPI Internal API only supports "basic auth"...
See 2768194 - Authorization to CPI internal Odata API.
That's a bummer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joost,
the OData API of the CPI does work with OAuth2 Bearer Token. You can try it with Postman, for example.
I just haven't got it to work with the OAuth2 Client Credentials as in the original post. I therefore took the work around and just used a HTTPS Receiver Adapter to retrieve the Bearer Token manually (Authentication set to 'Basic') and then set it as the Authorization header via a Groovy script. After that I used the OData Receiver Adapter with Authentication set to 'None'.
It seems like the grant_type=client_credentials query parameters are getting messed up or lost in the OData Receiver Adapter when the Authentication is set to 'OAuth2 Client Credentials', as I always got this response: {"error":"unsupported_grant_type","error_description":"Unexpected request grant type."}
Best regards
Jürgen
User | Count |
---|---|
76 | |
30 | |
9 | |
8 | |
8 | |
7 | |
7 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.