Which IIQ version are you inquiring about?
Version 8.3
Share all details related to your problem, including any error messages you may have received.
I Need Provision plan structure for delimiited file provisioning, Iam Facing issue with changing attribute values with provisioning plan.In place of plan.setNativeIdentity what should i use .
kjakubiak
(Kamil Jakubiak)
May 2, 2024, 11:05am
2
Hi Rajesh,
Welcome to Sailpoint Developer Community. Delimited file connector is not “direct” connector - that means it’s not supporting provisioning. You can only read data from the CSV file but you cannot write anything with this connector.
If you want to write you have to use for example - SQLLoadert connector which allows you to treat CSV file as database table and provision anything via SQL queries.
Here you can find very simple SQL Loader application definition with create operation supported via the rule.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Application PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Application connector="sailpoint.connector.JDBCConnector" featuresString="DISCOVER_SCHEMA, PROVISIONING, SYNC_PROVISIONING, DIRECT_PERMISSIONS, ENABLE, PASSWORD, ADDITIONAL_ACCOUNT_REQUEST, ACCOUNT_ONLY_REQUEST" icon="databaseIcon" name="TestSQL" profileClass="" type="SQLLoader">
<Attributes>
<Map>
<entry key="SQL" value="select * from data"/>
<entry key="additionalConnProperties">
<value>
<List>
<String>_CSV_Header=true</String>
</List>
</value>
</entry>
<entry key="afterProvisioningRule"/>
<entry key="aggregationPartitioned">
<value>
<Boolean></Boolean>
</value>
</entry>
<entry key="aggregationType" value="account"/>
<entry key="beforeProvisioningRule"/>
<entry key="compositeDefinition"/>
<entry key="driverClass" value="com.hxtt.sql.text.TextDriver"/>
<entry key="getObjectSQL" value="select * from data where username='$(identity)'"/>
<entry key="isPermissionEnabled">
<value>
<Boolean></Boolean>
</value>
</entry>
<entry key="jdbcCreateProvisioningRule" value="SQLLoaderCreate"/>
<entry key="mergeRows">
<value>
<Boolean></Boolean>
</value>
</entry>
<entry key="nativeChangeDetectionAttributeScope" value="entitlements"/>
<entry key="nativeChangeDetectionAttributes"/>
<entry key="nativeChangeDetectionEnabled">
<value>
<Boolean></Boolean>
</value>
</entry>
<entry key="nativeChangeDetectionOperations"/>
<entry key="partitionMode">
<value>
<Boolean></Boolean>
</value>
</entry>
<entry key="partitionStatements"/>
<entry key="provisionRule" value="operationRule"/>
<entry key="sysDescriptions">
<value>
<Map>
<entry key="en_US"/>
</Map>
</value>
</entry>
<entry key="templateApplication" value="SQLLoader Template"/>
<entry key="url" value="jdbc:csv:////app/data.csv"/>
<entry key="useExecuteQuery">
<value>
<Boolean></Boolean>
</value>
</entry>
<entry key="user" value="<username>"/>
</Map>
</Attributes>
<Owner>
<Reference class="sailpoint.object.Identity" name="spadmin"/>
</Owner>
<ProvisioningForms>
<Form name="create" objectType="account" type="Create">
<Attributes>
<Map>
<entry key="pageTitle" value="create"/>
</Map>
</Attributes>
<Section name="Section 1">
<Field name="username" required="true" reviewRequired="true" type="string"/>
<Field name="name" required="true" reviewRequired="true" type="string"/>
</Section>
</Form>
</ProvisioningForms>
<Schemas>
<Schema displayAttribute="name" identityAttribute="username" instanceAttribute="" nativeObjectType="account" objectType="account" permissionsRemediationModificationType="None">
<AttributeDefinition name="username" type="string">
<Description></Description>
</AttributeDefinition>
<AttributeDefinition name="name" type="string">
<Description></Description>
</AttributeDefinition>
</Schema>
</Schemas>
</Application>
and here is the rule for create operation
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Rule PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<Rule language="beanshell" name="SQLLoaderCreate" type="JDBCOperationProvisioning">
<Source>
import sailpoint.object.ProvisioningPlan;
import sailpoint.object.ProvisioningPlan.AccountRequest;
import sailpoint.object.ProvisioningPlan.AttributeRequest;
import java.lang.StringBuilder;
import java.sql.*;
import sailpoint.object.ProvisioningResult;
AccountRequest accReq = plan.getAccountRequests().get(0);
ProvisioningResult result = new ProvisioningResult();
String Name= accReq.getNativeIdentity();
String SamAccountName = accReq.getAttributeRequest("name") == null ? "null" : accReq.getAttributeRequest("name").getValue();
StringBuilder SQLQuery = new StringBuilder();
SQLQuery.append("INSERT INTO data (name, username) VALUES ('");
SQLQuery.append(SamAccountName);
SQLQuery.append("','");
SQLQuery.append(Name);
SQLQuery.append("');");
log.error(SQLQuery.toString());
PreparedStatement updateStatement = connection.prepareStatement(SQLQuery.toString());
try {
updateStatement.executeUpdate();
result.setStatus(ProvisioningResult.STATUS_COMMITTED);
return result;
} finally {
updateStatement.close();
}</Source>
</Rule>
And here some docummentation about SQLLoader
http://documentation.sailpoint.com/connectors/identityiq/sql_loader/help/
1 Like
system
(system)
Closed
July 1, 2024, 11:05am
3
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.