Need to fetch clientMetaData into webservicesBeforeOperation Rule

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

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

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