Hi all,
I am looking for a way to call the delete operation of a Web service app that we have onboarded. Any help is appreciated
Thanks in advance
Hi all,
I am looking for a way to call the delete operation of a Web service app that we have onboarded. Any help is appreciated
Thanks in advance
Hi @rishavghoshacc ,
If the user had account in webservice application, then go to
Manage Access → Manage Accounts → Select the account → Select delete option.
Above way, will trigger delete operation.
Thank you,
Harikrishna
You can create a custom plan and execute it using Provisioner. Below is a sample code -
import sailpoint.object.Identity;
import sailpoint.object.Filter;
import org.apache.log4j.Logger;
import sailpoint.object.ProvisioningPlan;
import sailpoint.object.ProvisioningPlan.AccountRequest;
import sailpoint.object.ProvisioningPlan.AttributeRequest;
import sailpoint.api.Provisioner;
import sailpoint.object.ProvisioningProject;
String userLogin="1a2b3a";
Identity identity = context.getObjectByName(Identity.class, "1a2b3a");
String appName = "Your_WebService_App";
String nativeIdentity = "targetAccountIdOrUsername"; // must match how the account is identified in the app
ProvisioningPlan plan = new ProvisioningPlan();
plan.setIdentity(identity);
AccountRequest ar = new AccountRequest();
ar.setApplication(appName);
ar.setNativeIdentity(nativeIdentity);
ar.setOperation(AccountRequest.Operation.Delete);
plan.add(ar);
System.out.println(plan.toXml());
// Execute provisioning
Provisioner prov = new Provisioner(context);
ProvisioningProject project = provisioner.compile(plan);
System.out.println("Project Set");
if (project != null && !project.isEmpty()) {
provisioner.execute(project);
context.saveObject(identity);
context.commitTransaction();
System.out.println("Execution Succeded");
} else {
throw new GeneralException("Provisioning project is empty");
}
Hope this helps!
@Harikrishna_06 I only see Disable option for the app
Hi @rishavghoshacc ,
Can you please share your application.xml file?
Hi @rishavghoshacc ,
Please refer below link.
Does your application support delete operation or just Disable. I think the code which @amit_1140 , gave is perfect. If your application support disable, just change the operation and try. If the application does not support delete, i think you can test with Disable.
Just create a Delete plan for the particular account and execute it. This is the best approach. It will help you complete your unit testing.
Enabling the delete option from the lifecycle manager will also enable deletion for another application.
Step 1 : Enable ‘delete’ option in manage accounts, for that navigate Gear Icon → Lifecycle Manager → 'Configure' tab -> Scroll Down to 'Manage Accounts Options'→ Enable Delete as shown below→ Save
{35628D92-AB41-4751-88D1-0C49CE69C48A}.png
Step 2: Navigate to ‘Manage Access’ → Manage Accounts → Choose identity who has your webservice account → Choose account and you can see delete option now
You can use A rule runner task to call the rule that contains the code for delete operation.
Another way is to enable the Delete operation through Lifecycle Manager Settings under Gear Icon.