Managing permissions in bulk can be a challenging task, especially when dealing with a large number of entries. This document provides a solution for removing target permissions in bulk from a database. Please note that this method is not officially tested, and it is crucial to back up your database before proceeding.
There is a need to delete over 6000 target permissions from a database. Performing this task manually is impractical and time-consuming. Therefore, an efficient method is required to remove these permissions in bulk
Identity Portal 14.4
To delete target permissions in bulk, the following SQL command can be used. This command assumes that the target permissions have no associations.
DELETE FROM TARGETPERMISSION WHERE ID=528;
Example:
The above command will delete the target permission with the tag TP_CAIM_ATTRIBUTE_%imString116% that is associated with ID=528.
Below is a sample script that can be modified to delete multiple target permissions:
-- Backup the database before running this script
-- Example: DELETE FROM TARGETPERMISSION WHERE ID IN (528, 529, 530, ...);
DELETE FROM TARGETPERMISSION WHERE ID=528;
DELETE FROM TARGETPERMISSION WHERE ID=529;
DELETE FROM TARGETPERMISSION WHERE ID=530;
-- Add more IDs as needed
Before proceeding with the bulk deletion, ensure that a complete backup of the database is made. This solution has not been officially tested, and performing these actions without a backup could result in data loss
While there is no out-of-the-box solution for removing target permissions in bulk, the provided SQL command offers a practical approach. Always ensure a backup of the database is made before performing bulk deletions. This method is efficient but should be used with caution.
This solution is provided as-is and has not been officially tested. The Broadcom and the author are not responsible for any data loss or issues that may arise from using this method. Always back up the database before performing any bulk operations.