rkhade
(Rakesh Khade)
September 18, 2024, 3:33am
1
Hi everyone,
I m working on a webservices Before Operation rule and need to fetch the clientMetadata and details within that from the plan, below is how the plan looks like, can anyone please suggest how it can be done.
I have tried to fetch it from accountRequest.getAttributeRequest(“clientMetadata”) but unable to.
Thank you
1 Like
gogubapu
(bapu gogu)
September 18, 2024, 3:58am
2
Hi @rkhade ,
if (accounts != null) {
//print first account Request using below // Get the first AccountRequest
AccountRequest accountRequest = accounts.get(0);
// Use getArguments() to get attributes
Map IdnAccessRequestAttributes = accountRequest.getArguments();
log.info("----=IdnAccessRequestAttributes===== "+IdnAccessRequestAttributes);
Map values=cloudPreviousValues.get("clientMetaData");
String department=values.get("Department");
log.info("----====== "+department);
} else {
log.info("No account requests found.");
}
Refer this post cloudPreviousValues in JDBC rule - Identity Security Cloud (ISC) / ISC Discussion and Questions - SailPoint Developer Community
I hope this will helps you.
Thank You.
1 Like
rkhade
(Rakesh Khade)
September 18, 2024, 10:43am
3
Hi @gogubapu ,
Thank you for response, Based on your code snippet i have tried below and it worked for me.
for (AccountRequest accReq : Util.iterate(provisioningPlan.getAccountRequests())) {
List attributes = accReq.getAttributeRequests();
AttributeRequest attributeRequest = attributes.get(0);
Map IdnAccessRequestAttributes = attributeRequest.getArguments();
log.info("----=IdnAccessRequestAttributes===== "+IdnAccessRequestAttributes);
Map clientMetaData = IdnAccessRequestAttributes.get("clientMetadata");
String deptFromPlan = clientMetaData.get("Department");
log.info("----====== "+deptFromPlan);
}
1 Like
system
(system)
Closed
November 17, 2024, 10:43am
4
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.