Error: Unknown User Permission when deploying profiles.When deploying profiles you might receive the error below for one or more user permissions:
[ERROR] [Profile <ProfileName>] Unknown user permission <PermissionName>
These kind of errors are standard deployment errors returned by Salesforce not Copado. In general these kind of errors are returned when you try to deploy permissions that doesn't exist in the target organization. This could happen for 2 reasons:
1. The org you are deploying from (source org) contains permissions related to features that doesn't exist or have not been enabled in the org you are deploying to (destination org).
2. When working with Copado, if you commit Profiles in User Stories, the feature branches are created form master branch which was created from production therefore your feature branch might contain these permissions related to features that doesn't exist or have not been enabled in the org you are deploying to (destination org) but exist in production org from where the feature branch was cloned.
You can use the "Find and Replace" feature in the deployment step with the regex below to skip the deployment of specific user permissions. For example:
Where "EditBillingInfo" and "ManageSandboxes" are the user permissions causing the errors.
You can also use a YAML file to avoid committing and replace those user permissions. You can find more information below on how to build YAML files in our documentation Global Find and Replace Rules.
Please note that creating or editing rules and regex in this file are out of scope of Copado Support. If you would like our Professional Services team to help you with such configuration, please us know by sending an email to firstname.lastname@example.org.