After updating to Dynamics 365 (December 2016), a solution that was imported in a previous version (e.g. in Dynamics CRM) fails during uninstallation/upgrade with an error message similar to “'Role' with id [RoleID] is required by the [SolutionName] solution.”

Applies to: Dynamics CRM

Symptom


Before an upgrade to the December 2016 update for Dynamics 365, a solution containing a custom role is installed. After the org upgrade, the solution can no longer be uninstalled/upgraded due to a dependency between the Role and another solution, most commonly the System solution. This issue is  not introduced or caused by the user.

Cause


In Dynamics 365, Business Process Flows (BPFs) are represented by first class entities that adhere to the Dynamics 365 security model just like any other entity. These entities are generated during the December 2016 upgrade to Dynamics 365. To ensure that all existing roles have the appropriate access to the BPFs, BPF privileges are automatically assigned to existing roles during upgrade. In certain cases, these privilege assignments can result in incorrect dependencies between solutions.

Resolution


  1. In Dynamics 365, navigate to Settings > Security > Security Roles. Then select the security role that appears in the error and open the Business Process Flows tab.
  2. Take note of the privileges that are assigned for the BPFs. A screenshot is useful, since it is a visual representation.
  3. Clear all privileges and then save the changes. This should remove the problematic dependencies. 
    Note: You may not be able to edit the privileges if the Role is part of a solution and is marked non-customizable. If the solution is unmanaged, you can update ‘Customizable’ managed property of the role and proceed. In case of a managed solution please contact Microsoft Support to make the role customizable. 
  4. Reassign the privileges that were previously assigned, and then save and close the dialog. This will ensure that the required access to different roles is retained.

There may be dependencies between multiple roles and solutions. In this case, perform the preceding steps for each of the roles that are being reported with issues.