The current Version is Dynamics 365 On-Premises v9.1.1.914, there are currently 118 security roles, 213 departments, and about 1,000 users in the system. Recently, the company's organizational structure has been changed, and the operation has been changed to the upper and lower levels of the business department, and the business department has been added. , The rolebase table in the database is emptied, all security roles are gone, query the backup file, this table has accumulated more than 50,000 rows of data
Finally, only the data of the rolebase table can be exported from the test server for recovery, and then it will return to normal. The above operations are verified later, and it is confirmed that the rolebase table will be emptied after the business department is changed or added. So wondering why this is causing this problem and what can I do to fix it
Thanks for your answer!
Maybe there's a problem with Google Translate, I'm getting my meaning wrong
Problems will arise after we perform the following operations, which is to adjust the superior department of a business department:
Then the RoleBase table in the database will be emptied, and the result of ’select count(*) from RoleBase‘ is 0.
Even the system deployment administrator has no permission to log in to the system again. We can only restore the RoleBase data in the test system to the production environment to return to normal.
We trace the above execution process through the SQL Server Profiler tool and trace to a stored procedure: p_ChangeRolesForBusinessMove
There is a command in this stored procedure to delete the data associated with RoleBase:
After we comment out the above command, the problem no longer occurs
Checked the entire stored procedure and found no exceptions
But this is definitely not the final solution, we want to know why there is a problem of emptying the entire RoleBase table, and how we can avoid this problem in the future.
Hi bai_xiaofei,
Security role versions are specific to business unit.
When we change the user’s business unit, all the current security roles of the users are removed and we need to assign the roles again to the user. This has always been the default behavior.
Now, you have the option to set the behavior for security roles:
Currently these settings are not available on the Settings UI to modify but these can be edited using the OrgDBOrgSettings community tool available.
After we have installed the managed solution, we can update the setting and set it as true:
Or you can refer following links for more other ways:
Tip #1134: Moving Users Between Business Units | Power Platform & Dynamics CRM Tip Of The Day
Update a User’s Business Unit and retain their Security Roles – Ryan Maclean (ryanmaclean365.com)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,302 Most Valuable Professional
nmaenpaa 101,156