Why including a permission set group into a 2gmp package version breaks installation of unvalidated beta package version into an org?
Is permission set group feature not product ready? Is this defected feature? What is going on?
Including a PermissionSetGroup (PSG) metadata in SFDX project and creating a beta package version using (--skipvalidation) will upload the beta package version successfully. However, this beta package version will fail validation during package install. The validation error during install will look something similar to:
TestPSG: Cannot create permission set group components since the following permission set names are invalid: TestPS1, TestPS2, TestPS3
Contrarily, creating the same beta package version without (--skipvalidation) using the identical PSG metadata will also upload the beta package successfully. However, this beta package install succeeds.
- The metadata of the managed package is as follows.
Permission sets metadata:
; Test ps1 to check ps and psg false TestPS1
Permission Set Group metadata:
; Test PSG to check if PS and PSG can be skipvalidated false TestPSG TestPS1 TestPS2 TestPS3 Updated
Create a managed package with few permission sets, and permission set group
Create a managed package version with --skipvalidation parameter
Create a managed package version without --skipvalidation parameter
Managed Package version created with --skipvalidation fails to get installed to an org and displays an error message, as (Test_PSG: Cannot create permission set group components since the following permission set names are invalid: Test PS1, Test PS2, Test PS3).
Managed Package version created without --skipvalidation, can be installed to any org.