We have received below requirement for Mend application and trying to integrate as web service with custom authentication. I am able to call below
API calls in Postman.
Secondly we call “https://test.com/api/v2.0/orgs/{orgToken}/users/self” returns information about the currently logged-in user,
including group membership and roles as we need to pass “orgToken” as Path Variables in Postman API call
Does anyone knows how to pass above Path Variable “orgToken” value received from step 1 to call the in the above 2 step in IDN Web Services test connection/ account aggregations HTTP operation?
Create an operation for ‘custom authentication’
– In the response mapping, ensure you capture the JWT token in an attribute you chose yourself, e.g. ‘jwt_token’
When performing the operation, do you actually see the custom attribute populated under the source when exporting using the ISC API? It should appear under the connectorAttributes section.
Its should be $application.token$. Hope you have mapped “token“as schema attribute in your first API call. Make sure first HTTP operation should be “custom authentication” type and same is configured in connection settings page.
My bad. I think you have already tried calling https://test.com/api/v2.0/orgs/$application.orgToken$/users/self which is correct. Is it possible to post the exact URL from postman? Try checking ccg logs by enabling debug log levels and see if above URL is able to reference the token.
This should work if the response mapping is correct and “custom authentication” is able to generate the token. So, what is the error you are getting. Is it 401?
Secondly we call “https://test.com/api/v2.0/orgs/{orgToken}/users/self” returns information about the currently logged-in user,
including group membership and roles as we need to pass “orgToken” as Path Variables in Postman API call
Try removing context URL from Custom Authentication. Only Authentication URL is required. Also, is it possible to post the response of /login URL by making the token info here?
In the response I don’t see orgToken and access_token, instead it is refreshToken and jwtToken. So in the response mapping tab, please change attribute path as refreshToken and jwtToken.
Hi Theja, I have changed as below bit getting same error Error Received:
Exception occurred in Test Connection.Url: https://test.com/api/v2.0/orgs//users/self, Message: 401 : Unauthorized : {“timestamp”:“2025-10-21T14:45:28Z”,“status”:401,“error”:“Unauthorized”,“message”:“”,“path”:“/api/v2.0/orgs/users/self”}, HTTP Error Code: 401
I was also getting a 401 and found out it wasn’t authenticatuing using the username and password from the connection settings when using $authenticate.username$ and $authenticate.password$. I had to use $application.username$ and $application.password$.