web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Importing multiple solutions without overwriting security RolePrivileges for same role

(0) ShareShare
ReportReport
Posted on by

Hi,

We are following the multiple solutions with shared components model for organizing solutions with a "base" solution and other solutions built on top of it for cleaner separation of components.

The shared entity fields and forms in base and other solutions when imported work together retaining customization from all solutions.

But, if a security Role is defined in base solution and the same existing role is defined in other solutions to add RolePrivileges for entity in that solution, the RolePrivileges of base solution are not retained and are overwritten by the solution customization which is imported last. How do I import RolePrivileges for the same role in different solutions without overwriting customizations?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Mayur ,

    This is expected behavior. Any changes in the security role privileges will be change all the solution  no matter in which solution the role has been added , you can not restrict this behavior.

    However the workaround is to create new security role.

  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    When we import solution,  Some components types in the solution follow Merge approach and other are imported on a Top-Wins basis.

    "Merge

    User interface components (command bar, ribbons, forms, and site map) are merged. This means that the solution components are re-calculated from the lowest level to the highest so that the organization’s unmanaged customizations are the last to be applied.

    Top Wins

    For all other solution components, any conflict is calculated in favour of the customization that is applied last. For managed solutions, this usually means that the last solution installed is applied. However, there is a special case when an update to a managed solution is installed"

    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/introduction-solutions

    As you can see the Security Role is not in the list of components that are merged.  A security role is imported using Top Wins approach.

    As Gautam suggested, you could create separate roles if you want to maintain the permissions in them. But if you don't want to have too many security roles and if you think it creates administrative overhead, you could move all your security role into a separate solution and update the permission only on one instance and export and import to others.

    In our company, we normally have a sec role solution and when we deploy to live for the first time, we export from Dev and import on Prod. Thereafter in most cases we export Sec roles from Prod to other environments as Prod will always have the up to date privileges set.

    Hope this helps

  • Mayur M Profile Picture
    on at

    Thanks Goutam

  • Suggested answer
    Mayur M Profile Picture
    on at

    Thanks Kokulan for the a security role solution idea.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Having different security  solution also can be a problem , let say if you have any role based forms for an entity  in the solutions. In that case you have to include the security role associated with the role based forms  in the solution. Otherwise you will have dependency issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans