Custom Auth 2.0 WEB SERVICES Source

Hi, I need help to configure a web services connector that has a py script with client id and secret based on oauth2.0 as authentication. I need to know how to configure the test connection and custom authentication. Can anyone help me?

Hi @vcarelli,
Thank you for the post. Please go through this document which clearly mentions what needs to be added for Oauth2.0 authentication. Let me know if you still need any help regarding the same..

Thanks

Hi Rakesh Bhati,

Basically the webservice connector has client id and client secret generated by Azure AD while the APIs run on another service.

Example:

Azure AD client id and secret
Generated token
With the generated token I access the target system that provides me the service and I do account aggregations, entitlement aggregations etc

Hi @vcarelli ,

You mean that you got client id and secret by registering the target application in Azure AD? In this case how you are getting the token? Is that never expiring one?

Yes, token expire after 1 hour.

ok, is your target application is web-based application? Does it have any API endpoints for authentication, aggregation etc.? Best way is to use application end points. I don’t think we can integrate it using Azure AD credentials

Hi theja, i tried on postman, and it worked.
The step that i have done are:
Generate bearer token with Client ID and Client Secret on this URL
https://login.microsoftonline.comx/XXX/oauth2/v2.0/token

This api returns token and after that I use this token for another api
https://api----xxxx----.com/xxxxxxxxx/getAccounts

And it worked!

Now, How can i implement this solution on my source?

Hi Vito,

You can go for custom authentication. Below are the steps.

  1. Select “Custom Authentication” as authentication type in Connection setting. Just provide base URL. Other fields are optional.

  1. In HTTP Operation, define first operation as “custom Authentication”. Settings as follow


    Provide headers accordingly

    Provide root path accordingly

    Attribute path to be given as per API response

  2. Define 2 HTTP operation as “Test Connection”. Settings as follows


Hi Theja,
I tried your solutions, but it didn’t work. I have this error in test connection