Mass Assign Permission Set to User(s) #inSalesforce

Mass Assign Permission Set to User(s):


Steps:

Get the list of Users who are not assigned a specific Permission Set:

Select AssigneeId,Assignee.Name,Assignee.EmployeeNumber,Assignee.Title FROM PermissionSetAssignment Where PermissionSet.Id <> '0PS24000000JXXX' and Assignee.IsActive = true and Assignee.EmployeeNumber <> null

Cross check: Select name from PermissionSet where id = '0PS24000000JXXX'

Get the Unique User list from the above result

Use data loader to an insert operation on PermissionSetAssignment AssigneeId are the UserIds returned above and the Permission Set Id '0PS24000000JXXX' for all of them and insert. Columns will be like AssigneeId, PermissionSetId


Note: Before this, if Mass Assignment of Permission Set License Assignments has to be done, refer the following :  https://thesalesforcetutorial.blogspot.com/2023/02/mass-assign-permission-set-license-to.html

Comments