Web Service Connector response mapping error

Hi I need one help, I am working on integrating cyberark using web service connector in our IdentityNow test env. Our first step i.e. test connection is working fine using cyberark connection/authentication test from IDN. In the next step, i.e. account aggregation, I am facing one issue where I am able to get response from CyberArk get accounts api but in ccg.log its saying one attribute value is not found. Could you please review below logs / configuration screenshots and suggest me where I am doing mistake.



"message":"processEndpoint: Response received for endpoint 'prv Accounts Aggregation' from: https:\/\/cadev.myorg.com\/PasswordVault\/region\/Accounts?filter=safeName eq region_myorg_PPA_TestUser24&limit=100","pipeline":"1.6.2","@timestamp":"2024-05-06T05:32:04.950Z","thread_name":"pool-6-thread-145",


"message":"Converting raw response to JSON: {\"value\":[{\"categoryModificationTime\":1663790931,\"platformId\":\"name_of_platform_id\",\"safeName\":\"region_myorg_PPA_TestUser24\",\"id\":\"962_3\",\"name\":\"prv-TestUser24-myorg.myorg.net\",\"address\":\"myorg.myorg.net\",\"userName\":\"prv-TestUser24\",\"secretType\":\"password\",\"platformAccountProperties\":{},\"secretManagement\":{\"automaticManagementEnabled\":false,\"manualManagementReason\":\"(CPM)MaxRetries\",\"status\":\"failure\",\"lastModifiedTime\":1663762373},\"createdTime\":1663762373}],\"count\":1}"


"message":"Extracting ROs using attribute mregionping {address=address, secretType=secretType, name=name, id=id, platformId=platformId, userName=userName, safeName=safeName} from rawResponse: {\"value\":[{\"categoryModificationTime\":1663790931,\"platformId\":\"name_of_platform_id\",\"safeName\":\"region_myorg_PPA_TestUser24\",\"id\":\"962_3\",\"name\":\"prv-TestUser24-myorg.myorg.net\",\"address\":\"myorg.myorg.net\",\"userName\":\"prv-TestUser24\",\"secretType\":\"password\",\"platformAccountProperties\":{},\"secretManagement\":{\"automaticManagementEnabled\":false,\"manualManagementReason\":\"(CPM)MaxRetries\",\"status\":\"failure\",\"lastModifiedTime\":1663762373},\"createdTime\":1663762373}],\"count\":1}"


"message":"Parsing values for JSON paths [address, secretType, name, id, platformId, userName, safeName] from JSON: [{\"categoryModificationTime\":1663790931,\"platformId\":\"name_of_platform_id\",\"safeName\":\"region_myorg_PPA_TestUser24\",\"id\":\"962_3\",\"name\":\"prv-TestUser24-myorg.myorg.net\",\"address\":\"myorg.myorg.net\",\"userName\":\"prv-TestUser24\",\"secretType\":\"password\",\"platformAccountProperties\":{},\"secretManagement\":{\"automaticManagementEnabled\":false,\"manualManagementReason\":\"(CPM)MaxRetries\",\"status\":\"failure\",\"lastModifiedTime\":1663762373},\"createdTime\":1663762373}]",


"message":"Parsing values for JSON paths [address, secretType, name, id, platformId, userName, safeName] from JSON: 

"message":"Identity attribute [name] was not found.",

{"exception":

{"stacktrace":"java.lang.RuntimeException: Identity attribute [name] was not found.\n\tat 

"message":"Mregionping names for null object, returning...",

"message":"Identity attribute [name] was not found."

"message":"Error while RO transformation - Identity attribute [name] was not found

here is the response from get accounts api which I see from postman

https://cadev.myorg.com/PasswordVault/api/Accounts?filter=safeName eq region_myorg_PPA_TestUser24&limit=1000

{
    "value": [
        {
            "categoryModificationTime": 1663790931,
            "platformId": "name_of_platform_id",
            "safeName": "region_myorg_PPA_TestUser24",
            "id": "962_3",
            "name": "prv-TestUser24-myorg.myorg.net",
            "address": "myorg.myorg.net",
            "userName": "prv-TestUser24",
            "secretType": "password",
            "platformAccountProperties": {},
            "secretManagement": {
                "automaticManagementEnabled": false,
                "manualManagementReason": "(CPM)MaxRetries",
                "status": "failure",
                "lastModifiedTime": 1663762373
            },
            "createdTime": 1663762373
        }
    ],
    "count": 1
}

I think problem is in the http operation account aggregation response mapping. For testing purpose I changed the response mapping as per below screenshot and then I checked ccg.log

"message":"Extracting ROs using attribute mapping {address=address, secretType=secretType, name=$..name, id=id, platformId=platformId, userName=userName, safeName=safeName} from rawResponse: {\"value\":[{\"categoryModificationTime\":1663790931,\"platformId\":\"name_of_platform_id\",\"safeName\":\"region_myorg_PPA_TestUser24\",\"id\":\"962_3\",\"name\":\"prv-TestUser24-myorg.myorg.net\",\"address\":\"myorg.myorg.net\",\"userName\":\"prv-TestUser24\",\"secretType\":\"password\",\"platformAccountProperties\":{},\"secretManagement\":{\"automaticManagementEnabled\":false,\"manualManagementReason\":\"(CPM)MaxRetries\",\"status\":\"failure\",\"lastModifiedTime\":1663762373},\"createdTime\":1663762373}],\"count\":1}"

looks like something is tricky here on how to write response mapping attribute value. Could you please suggest

Hi Himanshu,

Looking at the json payload from postman, you have shared, i think if you change the root path to $.value, that should already give you an array and then you can have the mapping like

name :name 
id :id 

Can you please try changing the root path and then try to aggregate once and let me know if that helps.

Thank You.
Regards
Vikas.

2 Likes

@hranjan3 : I too believe that you need to change the root path as mentioned by @vguleria, let us know if you still have the issue.

2 Likes

@vguleria Thank you so much Vikas for your response. I changed the root path and it worked. I am able to get the accounts properly. I will update you if there is any further issue.

1 Like

@Saket95606 Thanks a lot for your response. Issue is fixed now!

1 Like

Happy to connect separately if any generic issue is there :slight_smile: Gook luck mate

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.