You need to sign in to do that
Don't have an account?
How do I mass unassign a permission set from multiple users?
I need to unassign a permission set to over 140+ users. Is there a way I can do this with workbench or dev console? Thanks!
You need to sign in to do that
Don't have an account?
There are two options:
1. https://help.salesforce.com/articleView?id=000097208&type=1
2. https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/perm_sets_remove_assignments.htm
It it helps, mark it as best answer
Thanks,
Neetu
Thanks for helping but I already went through those articles and its not what I am looking for. I think the only way to mass unassign a permission set will be with code, unless someone else has another idea.
Thanks!
PermissionSetAssignment Represents the association between a User and a PermissionSet. This object is available in API version 22.0 and later. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_permissionsetassignment.htm
1) Developer console: query editor or Workbench
select id, AssigneeId,Assignee.Name,PermissionSetId,PermissionSet.Label,PermissionSet.Description
from PermissionSetAssignment
2) Developer console: Anonymous console or Workbench = Utilities + Apex Execute you can delete records directly like that:
DELETE [select id from PermissionSetAssignment where PermissionSetId = '0PS58000000NQtLGAW' LIMIT 100 ];
DELETE [select id from PermissionSetAssignment where PermissionSetId = '0PS58000000NQtLGAW'
and AssigneeId in ('005xxxx','005xxxy', ...) ];
AssigneeId = User Ids.
or:
List<PermissionSetAssignment> psa = [select id from PermissionSetAssignment where PermissionSetId = '0PS58000000NQtLGAW' and AssigneeId in ('005xxxx','005xxxy', ...) ];
system.debug('PermissionSetAssignment before: ' + psa.size());
delete psa;
Alain