cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Target aggregation rule

Target aggregation rule

Find the acctNativeIdentity in application schema:

2020-08-30_16-29-45.png

 

Run the rule in Debug:

 

 

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sailpoint PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<sailpoint><Rule language="beanshell" name="Target-Aggregation">
  <Source><![CDATA[
 	    import sailpoint.object.Application;
 	    import sailpoint.object.Attributes;
 	    import sailpoint.object.ResourceObject;
 	    import sailpoint.object.TaskResult;
 	    import sailpoint.api.Aggregator;
 	    import sailpoint.connector.Connector;
		
		/*
		 * Provide the appName and acctNativeIdentity below and run the rule in Debug
		 */
		String appName = "";
		String acctNativeIdentity = "";
		
		Application appObject = context.getObjectByName(Application.class, appName);
		String appConnName = appObject.getConnector();
	    Connector appConnector = sailpoint.connector.ConnectorFactory.getConnector(appObject, null);
	   	ResourceObject rObj = appConnector.getObject("account", acctNativeIdentity, null);
		
   	 	if(rObj!=null) {
 	 		Attributes argMap = new Attributes();
 	 		argMap.put("aggregationType", "account");
 	 		argMap.put("applications", appName);
 	 		argMap.put("descriptionAttribute","description");
 	 		argMap.put("descriptionLocale", "en_US");
 	 		argMap.put("noOptimizeReaggregation", "true");
 	 		Aggregator agg = new Aggregator(context, argMap);
 	 		TaskResult result = agg.aggregate(appObject,rObj);
  	 		return rObj.toXml();
 	 	} else {
 	 		return "The account: " + acctNativeIdentity + " can not be found.";
    	}

  ]]></Source>
</Rule>

 

Labels (1)
Comments

I am getting an error when running this rule. "Exception running rule: The application script threw an exception: sailpoint.connector.ConnectorException: No configuration found for 'Get Object'. Please add at least one operation and try again. BSF info: Test-Target-Aggregation at line: 0 column: columnNo". 

I have the same issue with a WebService connector and IIQ 8.2p1

For Web Service connector, please add the "Get Object" operation to your application.

I have created a "Get Object" Operation and am using the same endpoint as the "Account Aggregation" operation. When I run this rule, it returns the first account that the "Account Aggregation" touches, which is not the user who I have hard coded in the acctNativeIdentity. What's also odd is that when this rule is ran, it correlates the first user that gets returned from the endpoint to the acctNativeIdentity identity. So the identity I am trying to run this rule on now has 2 application accounts.  I have also tried updating the Get-Object endpoint to only specify that particular account to get returned (for testing purposes) and am getting "exception is : 422 : {"error":{"message":"null objCode"}} BSF info: Test-Target-Aggregation at line: 0 column: columnNo". 

Any help would be greatly appreciated!

VG

Getting below error when trying to create account in target application via SCIM 2.0. Appreciate if someone can guide how to solve this issue ?

 

sailpoint.connector.ConnectorException: No configuration found for 'Get Object'. Please add at least one operation and try again.

@VG You have to add "Get Object" connector operation in Application Configuration Settings for single account aggregation like account aggregation for all the accounts. That may resolve your issue "sailpoint.connector.ConnectorException: No configuration found for 'Get Object'. Please add at least one operation and try again"

@jkgellhaus You have to use different endpoint or add filter to context URL for Single account aggregation which return only that account info in response, Since you are using endpoint same as Account aggregation the API return response of all the records and get object will pick the first record. Try to hit the Get Object endpoint URL from different client example CURL command or Postman and you will find the difference. Hope this might help.

Example: https://graph.microsoft.com/v1.0/servicePrincipals return all the service principals in Azure tenant, to filter out specific service principal we need to use Context URL as /v1.0/servicePrincipals/$getobject.nativeIdentity$ which return only that specific service principal info.

Version history
Revision #:
5 of 5
Last update:
‎Mar 22, 2023 12:05 PM
Updated by: