Loading
Feature degradation | Gmail Email delivery failureRead More

Use Data Loader to mass assign permission sets

Publish Date: Aug 30, 2024
Description

If you need to assign a permission set to multiple users at once, the fastest option is Data Loader. To do this, you'll need to prepare a CSV file with two column headers (User Id & Permission Set Id).

Resolution
Warning
Always back up your data before performing any data operation. See Export Backup Data from Salesforce or Export Data for more details. It is recommended to run a test with a small subset of records to ensure the operation was successful through manually opening and verifying that the corresponding records are correct in Salesforce.



To get the Permission Set ID

If you're only assigning one permission set, find the ID for that permission set under Setup:

  1. Login to the org and navigate to Setup
  2. Type permission into the Quick Find box and click Permission Sets.
  3. Click on the permission set to be assigned.
  4. Look at the URL for the page. 

The permission set ID will be a 15-digit ID that starts with 0PS.

If you're assigning multiple permission sets, it may be easier to export a list of IDs using Data Loader:

  1. Open Data Loader, click Export, and login to your org
  2. Check the checkbox Show all objects
  3. Select the object Permission Set
  4. Select the folder to save the file and click Next 
  5. Select the ID field, and any other fields that will help identify the correct permission sets.
  6. Click OK.
  7. Click Next.
  8. Click Finish.

 

To get the User IDs

  1. Repeat the above steps using the User object
  2. Select the ID field again, and any other fields that will help identify the correct users.

 

Create the assignment CSV file

Once you have a list of the permission set and user IDs, create a new CSV file containing two columns:

  • AssigneeId - The IDs of the users that will be assigned the permission set
  • PermissionSetId - The ID of the permission set to be assigned

Note: If one users needs to be assigned multiple permission sets, each assignment should be added to the CSV file as a separate row. 

To mass assign existing Users to new permission set using Data Loader

  1. Open Data Loader, click Insert, and login to your org
  2. Check the checkbox Show all objects
  3. Select the object Permission Set Assignments
  4. Browse for your csv file
  5. Click on Next button and click Ok on the pop-up
  6. Click 'Create or Edit a Map'
  7. Map the columns from your spreadsheet.
  8. Click on 'Ok' button, then 'Next'
  9. Click on 'Finish' button

Note: If you are getting an error  "Can't complete this operation because it would exceed the number of apps allowed by the user license." while assigning multiple users to the permission set with application license assignment included in it. Kindly reduce the Batch Size: '1' and it will be resolved.



See also
Insert, Update, or Delete Data Using Data Loader

Knowledge Article Number

000384595

 
Loading
Salesforce Help | Article