Configure a soft-delete policy and global configuration.
  1. To configure request criteria for soft deletes, use the create-request-criteria option with dsconfig.

    In this example, the soft delete request criteria is configured for an external delete request from a member of the internal applications group matching an entry with object class inetorgperson with the request excluding the Soft Delete Request Control and the Hard Delete Request Control.

    $ bin/dsconfig create-request-criteria \             
      --criteria-name "Soft Deletes" \
      --type simple \ 
      --set "description:Requests for soft delete" \ 
      --set operation-type:delete \  
      --set operation-origin:external-request \ 
      --set "connection-criteria:Internal Applications" \ 
      --set not-all-included-request-control:1.3.6.1.4.1.30221.2.5.20 \
      --set "all-included-target-entry-filter:(objectClass=inetorgperson)"
  2. In the soft delete policy you previously created, set the auto-soft-delete-connection-criteria property to the simple criteria created in the previous step.
    $ bin/dsconfig create-soft-delete-policy \ 
      --policy-name default-soft-delete-policy \ 
      --set "auto-soft-delete-request-criteria:Soft Deletes"