Skip to main content

Is it the user permissions that aren't getting deployed to the org?

Troubleshooting when user permissions are not deployed through CI jobs/pipelines

Written by Chris Mead

When you create a new CI job, on the Deployment behavior page you can decide whether to include user permissions in the CI deployment (this also includes system permissions and app permissions).

To configure this setting, follow these steps:

  1. Navigate to the CI job dashboard in Gearset.

  2. Select the relevant CI job and click Edit settings.

  3. Open the Deployment behavior tab.

  4. Enable the option to include system/user permissions in deployments.

If this setting is disabled, your CI job is configured to not deploy these permissions - even if they've been merged into the source branch of the CI job, or when you have added new or changed user/system/app permissions into a Pull Request and merged the PR into the environment branch (source of the CI job).

In some cases, you might intentionally disable this setting to manage permissions selectively and prevent unintentional access changes.

This is expected behavior when Include user permissions is disabled in your CI job settings. For more information about what this setting controls, see What does the checkbox 'Include User Permissions' mean in a CI job?.

How to deploy missing user permissions

Enable Include user permissions in the CI job’s Deployment behavior settings if you want these permissions included in future deployments.

If Delta CI has already skipped the permission changes

If your environment uses Delta CI and a successful CI run has already processed the commit containing these changes while this setting was disabled, enabling the setting alone may not deploy the previously excluded permissions. Delta CI considers changes since the most recent successful deployment, rather than all differences between the branch and the org.

To deploy the missing permissions, run a manual comparison using the environment branch as the source and the affected org as the target. Include Permission set in the comparison filter for permission-set user permissions, or Profile plus another metadata type such as Custom object for profile user permissions. Review and select the relevant user-permission differences, then deploy them.

Did this answer your question?