Thursday, 27 September 2018

Dynamics CRM : Export Security Role


In CRM as a developer sometime we need to see permission given to Security role.
Dynamics CRM/365 we need to open security role to check permission in that security role.
But there is no provision to export Security role permission.

Case Study: -
Developer X is working in an organization as support engineer. He was not part of implementation team.
User requested role given in each security role permission in excel sheet.
It is time consuming job to open each security role and make excel sheet manually with all permission.

Solution: -
To tackle this case study, I have created a XrmToolBox Plugin which help Developer X.
User can see permission given in each security role to entity.
User can see Miscellaneous Privileges.
User can export all Privileges based on selected Security role.
Download XRMToolBox from given URL and install. https://www.xrmtoolbox.com/
Install “Export Security Role” Plugin in your XRMTollBox using plugin store.

























If you are not able to find “Export Security Role.
Go to given link.

Download Plugin

And download plugin from here. Install in XRMToolBox by clicking Settings->Path->Storage folder->Plugin folder.
Copy assemblies in Plugin folder.









































Connect your organization and open plugin Export Security Role.













Click on “Retrieve Roles” and select your security Role.
Now you will see list of all security roles in role list.





Now when you select any security role it will show all Privileges for selected security role.

































If need to search specific entity enter logical name in search box.











Click on Export button to export privileges in excel.
















As a result, you will see a excel file with Security role name is create with all privileges.





























Now Developer X will easily able to find and share permission based on security role.

Note: - Plugin based on .net framework 4.5.2. Microsoft office required to export result.

Follow my blog so you will not miss my new upcoming blogs.

13 comments:

  1. I like that the visibility to Teams and Users that the security role is assigned to are shown. However, just clicking on a Business Unit and a Security Role did not show any of the permissions on the screen as shown in your explanation. What did I miss?

    ReplyDelete
  2. Hey Santosh thank you for your effort! I did experience the same thing. All permissions are either set as "None" or "Organization", with no "Business Unit" or "User" or "Parent: Child Business Units" values.

    ReplyDelete
    Replies
    1. Hi Hani,
      Thanks for reply.
      I have verified your reply and I can see other permission also like "user", "business unit". Try with other security role.
      Miscellaneous privileges can be organization only.

      Delete
  3. Hi Santosh, even i faced the same issue, either its organization or none, other privileges are not showing up.

    ReplyDelete
    Replies
    1. Issue is fixed now and latest code in avaliable in given link.
      Please try and share your comment.
      https://github.com/santoshCRM/Export-Security-Role/blob/master/Assembly.zip

      Delete
  4. Hi Santosh, I'm not able to get the plugin to show up in the xrmtoolbox store. Is it still publsihed? If so, do you have more instructions how to add it?

    ReplyDelete
    Replies
    1. Hi Bassio,
      I think xrmtoolbox yet not verifed plugin. I have shared plugin source in download link https://github.com/santoshCRM/Export-Security-Role/blob/master/Assembly.zip
      You can download and add in your plugin folder.

      Delete
  5. Great work but when i export the roles, i only get "None" or "Organization". Not the others. Is it possible to fix?

    ReplyDelete
    Replies
    1. Issue is fixed now and latest code in avaliable in given link.
      Please try and share your comment.
      https://github.com/santoshCRM/Export-Security-Role/blob/master/Assembly.zip

      Delete
  6. Hi Folks,

    Issue is fixed now and latest code in avaliable in given link.
    Please try and share your comment.
    https://github.com/santoshCRM/Export-Security-Role/blob/master/Assembly.zip

    ReplyDelete
  7. Looking for custom CRM software development company? Try our CRM services! Augurs provide a wide range of custom CRM development services tailored to the industry-specific requirements.

    ReplyDelete
  8. When i try to export is showing this error: Is not working, Helppppp please

    System.Runtime.InteropServices.COMException (0x8002000B): El índice no es válido. (Excepción de HRESULT: 0x8002000B (DISP_E_BADINDEX))
    en Microsoft.Office.Interop.Excel.Sheets.get__Default(Object Index)
    en ExportSecurityRole.ExportRole.btn_Export_Click(Object sender, EventArgs e)
    en System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
    en System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
    en System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
    en System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
    en System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
    en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    en System.Windows.Forms.Control.WndProc(Message& m)
    en System.Windows.Forms.ToolStrip.WndProc(Message& m)
    en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ReplyDelete
    Replies
    1. Make sure you have installed Microsoft office 365. and try again.

      Delete

Dynamics Portal-Note Required Based On Quick View Form Value

Microsoft Dynamics Portal provides capability to allow login customers without needed any license. Here I am not explaining benefits of D...

Test