Newer Version Available
Assign a Permission Set
After creating your scratch org and pushing the source, you must sometimes give your
users access to your application, especially if your app contains custom objects.
-
If needed, create the permission set in the scratch org.
- Create a scratch org.
- From Setup, enter Perm in the Quick Find box, then select Permission Sets.
- Click New.
- Enter a descriptive label for the permission set, then click Save.
- Under Apps, click .
- Under Available Apps, select your app, then click Add to move it to Enabled Apps.
- Click Save.
-
Pull the permission set from the scratch org to your project.
1sfdx force:source:pull -u <scratch org username/alias> -
Assign the permission set to the org that contains the app:
1sfdx force:user:permset:assign -n <permset_name> -u <org username/alias>If a target username isn’t specified, the permission set is assigned in the default scratch org using the default username.