Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Unable to access dynamic attribute in Add Access JSOM and Add Access JSON is not getting called.

IAM-Vaibhav
New Contributor III
New Contributor III

Hi Team

I am facing error while access the dynamic attribute in Add Access JSON. 

Dynamic Form Configuration:

IAMVaibhav_1-1702277786624.png

 

ADD Access JSON :

{
"call": [
{
"name": "Project",
"connection": "acctAuth",
"url": "<ENDPOINT URL>",
"httpMethod": "PUT",
"httpparams": "{\"shellnumber\": \"${entitlementvalue.entitlementID}\",\"users\": [{\"username\": \"${user.email}\",\"status\": \"${user.status}\",\"group_add\":\"${if (reqAttrs.customproperty4!=null){reqAttrs.customproperty4} else{\"\"}}\",\"group_remove\": \"\"}]}",
"httpHeaders": {
"Authorization": "${access_token}",
"contentType": "application/json"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
500,
400,
401,
403
]
}
}
]
}

Also I observed in Add access API is not getting called.

2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - entitlementName: Project
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - params.memento.addAccessJSON : [call:[[name:ProjectAdd, connection:acctAuth, url:https://10.62.32.212:8205/ws/rest/service/v1/admin/user/shell/membership, httpMethod:POST, httpparams:{"shellnumber": "${entitlementvalue.entitlementID}","users": [{"username": "${user.email}","status": "${user.status}","group_add":"${if (reqAttrs.customproperty3!=null){reqAttrs.customproperty3} else{""}}","group_remove": ""}]}, httpHeaders:[Authorization:${access_token}, contentType:application/json], httpContentType:application/json, successResponses:[statusCode:[200]], unsuccessResponses:[statusCode:[500, 400, 401, 403]]]]]
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - currentEntitlementJsonMap: [call:[]]
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - params.memento.addAccessJSON: [call:[]]
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - Total Call: 0
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - Task Response: null
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - Result: false
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] DEBUG rest.RestProvisioningService - taskResult:: true
2023-12-11/11:06:16.997 [{}] [quartzScheduler_Worker-11] ERROR rest.RestProvisioningService - Error while creating account - 71684585 removing tasks from the list

 

And Getting below error : 

ERROR services.ArsTaskService - Exception
groovy.lang.MissingPropertyException: No such property: CUSTOMPROPERTY1 for class: com.saviynt.ecm.identitywarehouse.domain.Accounts
at com.saviynt.ecm.services.ArsTaskService$_createUpdateAccountTasks_closure108_closure263.doCall(ArsTaskService.groovy:6746)
at com.saviynt.ecm.services.ArsTaskService$_createUpdateAccountTasks_closure108.doCall(ArsTaskService.groovy:6745)
at com.saviynt.ecm.services.ArsTaskService.createUpdateAccountTasks(ArsTaskService.groovy:6719)
at MultipleProvisioningJob.execute(MultipleProvisioningJob.groovy:206)
at org.quartz.core.JobRunShell.run(JobRunShell.java:199)

5 REPLIES 5

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @IAM-Vaibhav,

Can you please  confirm if you are able to view the dynamic attribute in the pending task under task details.
PFA screenshot for sample,

sudeshjaiswal_0-1702315371135.png

Please try with the below sample json.

 

{
    "call": [{
            "name": "Project",
            "connection": "acctAuth",
            "url": "<ENDPOINT URL>",
            "httpMethod": "PUT",
            "httpparams": "{\"shellnumber\": \"${entitlementvalue.entitlementID}\",\"users\": [{\"username\": \"${user.email}\",\"status\": \"${user.status}\",\"group_add\":\"${if (requestAccessAttributes?.get('groups')!=null){requestAccessAttributes?.get('groups')} else{\"\"}}\",\"group_remove\": \"\"}]}",
            "httpHeaders": {
                "Authorization": "${access_token}",
                "contentType": "application/json"
            },
            "httpContentType": "application/json",
            "successResponses": {
                "statusCode": [
                    200
                ]
            },
            "unsuccessResponses": {
                "statusCode": [
                    500,
                    400,
                    401,
                    403
                ]
            }
        }
    ]
}

 



Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

rushikeshvartak
All-Star
All-Star

Its seem account column in  dynamic attribute was in upper case as CUSTOMPROPERTY1  and now its fixed please retry new request


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

IAM-Vaibhav
New Contributor III
New Contributor III

@sudeshjaiswal ,

I will test this in next couple of hr and will update you.

I would like to clarify one doubt between reqAttrs.customproperty3 and requestAccessAttributes?.get('groups'). Why reqAttrs.customproperty3 didn't work here as its working in our other rest base connections for Disconnected applications.

REST connector for Disconnected Apps ?

https://forums.saviynt.com/t5/identity-governance/rest-passing-dynamic-attribute-during-ticket-creat... 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Hi @rushikeshvartak  ,

reqAttrs.customproperty7 - this is working in our PROD now; its version is 5.5x3.9 

our Dev is 5.5x3.14.