function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
santhosh  konsanthosh kon 

How to delete a permission set which was assigned to 100 users

Best Answer chosen by santhosh kon
pconpcon
You can delete all of the assignments and then delete the permission set.  By running the following in the Developer Console anonymous execution
 
List<PermissionSetAssignment> psaList = [
    select Id
    from PermissionSetAssignment
    where PermissionSetId = '0PSA00000XXXXX'
];
delete psaList;

Then delete the permission set