Question
MD Cloud
AM
Last activity: 29 Aug 2023 0:23 EDT
Calling SOAP service with Bearer Authentication type
Hi!
I am trying to integrate with EWS and until recently we were using basic authentication and everything worked, but now Basic authentication is no longer supported for EWS to connect to Exchange Online. We need to use OAuth2 authentication according to Microsoft documentation.
I followed the steps described in Authenticate an EWS application by using OAuth, created REST connector and successfully extracted token but then I need to call SOAP integration for needed method.
I was able to successfully test the service in Postman by selecting the Authentication type as Bearer but can't do the same in Pega, so I tried JWT Bearer and client credentials
but every time it fails in InvokeAxis2 with the following 401 error:
com.pega.pegarules.pub.services.RemoteApplicationException: SOAP service failed |
Hi!
I am trying to integrate with EWS and until recently we were using basic authentication and everything worked, but now Basic authentication is no longer supported for EWS to connect to Exchange Online. We need to use OAuth2 authentication according to Microsoft documentation.
I followed the steps described in Authenticate an EWS application by using OAuth, created REST connector and successfully extracted token but then I need to call SOAP integration for needed method.
I was able to successfully test the service in Postman by selecting the Authentication type as Bearer but can't do the same in Pega, so I tried JWT Bearer and client credentials
but every time it fails in InvokeAxis2 with the following 401 error:
com.pega.pegarules.pub.services.RemoteApplicationException: SOAP service failed |
I tried passing the token in the header as was described in this post Consuming Rest service with Bearer Authentication type ? but it didn't work.
And it seems like the only way is to customize InvokeAxis2 activity, as now it works only for OAuth. Cause now it seems like OOTB functionaly doesm
So maybe someone has suggestion how to solve this issue without overriding OOTB rules.
Thanks!