Share all details about your problem, including any error messages you may
Is there anyway that I can write a standalone rule to provision entitlements with a sunset date? I have tried the following below but the date is not getting created. Am I missing anything?
SimpleDateFormat sdf=new SimpleDateFormat("ddMMyyyy");
String stringDate = "30112024";
Date sunset = sdf.parse(stringDate);
ProvisioningPlan sfPlan = new ProvisioningPlan();
sfPlan.setIdentity(identity);
AccountRequest accountRequest = new AccountRequest();
accountRequest.setApplication(appName);
accountRequest.setOperation(AccountRequest.Operation.Modify);
accountRequest.setNativeIdentity(nativeIdentity);
AttributeRequest attrReq = new AttributeRequest(entName, ProvisioningPlan.Operation.Add, entValue);
attrReq.setRemoveDate(sunset);
Attributes attrb = new Attributes();
attrb.put("assignment","true");
attrReq.setArgs(attrb);
accountRequest.add(attrReq);
sfPlan.add(accountRequest);
Provisioner provisioner = new Provisioner(context);
provisioner.setNoLocking(true);
ProvisioningProject project = provisioner.compile(sfPlan);
provisioner.execute(project);
context.saveObject(identity);
context.commitTransaction();
context.decache(identity);
Thanks for the information. I have managed to get this showing in the UI with the deactivate date. However, as this is just a standalone rule for creating the provisioning plan, I noticed that there is no request object being created where it will deprovision on the sunset date. Could you advise the additional steps needed for the scheduled request object to be created so that it will be deprovisioned on the sunset date?