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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

User Roles Export

(0) ShareShare
ReportReport
Posted on by 190

Hello,

I want to export an excel file/file which can show the security roles of each user we currently have. Is it possible to do this in an efficient way instead of clicking into each individual user and taking down what roles they possess?

Any help would be greatly appreciated.

Thank you in advance.

I have the same question (0)
  • Verified answer
    Gary Letter Profile Picture
    1,267 on at
    RE: User Roles Export

    Hi dynamicsgs,

    In the Reports area, you can run the User Summary report to show all the security roles assigned to each user.

    Gary Letter
    NextLevel Business Systems

    If you find the answer useful, please click "Yes" to mark it as verified.

  • Verified answer
    LuHao Profile Picture
    40,890 on at
    RE: User Roles Export

    Hi partner,

    Basically, there are two ways.

    1. We can use OOTB report to export Excel.

    Open Advanced Find, Look for Reports, set condition: Name Equals "User Summary", click Results.

    pastedimage1583292084641v1.png

    Open the report.

    pastedimage1583292115989v2.png

    Select the user scope and click Run Report.

    pastedimage1583292164435v3.png

    You will see the security roles of all users. Then save as Excel.

    pastedimage1583292251194v6.png    pastedimage1583292288118v7.png

    This report, however, does not show the security roles directly in one column, but rather many columns in which each user corresponds to his or her security role.

    So if you want to display security roles directly in one column, you need to use XrmToolBox's "Users, Team and Security Role Report" tool.

    2. XrmToolBox's "Users, Team and Security Role Report" tool

    This is the download page for XrmToolBox: https://www.xrmtoolbox.com/

    After downloading and unzipping it, open XrmToolBox.exe.

    Connect to your D365 organization. Install "Users, Team and Security Role Report" in the tool library.

    Open the tool and click Load Data, then click Generate Report. It will download two files, one is .csv and one is .xlsx.

    Use Notepad to open the .csv file and copy all. Then open the .xlsx file and paste the data in the first worksheet.

    The effect is as follows:

    pastedimage1583294188214v8.png

  • dynamicsgs Profile Picture
    190 on at
    RE: User Roles Export

    Hi Lu,

    This is a great help. Thank you so much. 

  • technology101010 Profile Picture
    35 on at
    RE: User Roles Export

    Hello,

    This is very helpful. Is there any way to filter the users who used a specific entity like for example Leads?

    Thanks!

    Tech101010

  • Suggested answer
    Ysondh Profile Picture
    5 on at
    RE: User Roles Export

    Great read and very helpful. Thanks alot.

    [quote user="dynamicsgs"]

    Hello,

    I want to export an excel file/file which can show the security roles of each user we currently have. Is it possible to do this in an efficient way instead of clicking into each individual user and taking down what roles they possess?

    Any help would be greatly appreciated.

    Thank you in advance.

    [/quote]

    [quote user="dynamicsgs"]

    Hello,

    I want to export an excel file/file which can show the security roles of each user we currently have. Is it possible to do this in an efficient way instead of clicking into each individual user and taking down what roles they possess?

    Any help would be greatly appreciated.

    Thank you in advance.

    [/quote]

    [quote user="dynamicsgs"]

    Hello,

    I want to export an excel file/file which can show the security roles of each user we currently have. Is it possible to do this in an efficient way instead of clicking into each individual user and taking down what roles they possess?

    Any help would be greatly appreciated.

    Thank you in advance.

    [/quote]
  • jork Profile Picture
    12 on at
    User Roles Export
    If you have access the backend via SSMS (connecting via Azure Active Directory - Universal with MFA), the below SQL script is what I use for exporting active users with their roles:
     
    SELECT
        U.SystemUserId,
        U.FullName,
        U.AccessModeName,
        U.DomainName,
        U.InternalEmailAddress,
        U.Title,
        RC.UserRoleCount,
        STUFF((SELECT DISTINCT '; ' + R.Name
                FROM systemuserroles SUR INNER JOIN role R ON R.roleid = SUR.roleid
                WHERE SUR.systemuserid = U.systemuserid
                For XML Path('')), 1, 2,'') AS AssignedSecurityRoles
    FROM
        systemuser U
        LEFT JOIN (SELECT SystemUserId, COUNT(1) AS UserRoleCount FROM systemuserroles GROUP BY SystemUserId) RC ON RC.systemuserid = U.systemuserid
    WHERE
        U.IsDisabled = 0
        --AND U.fullname NOT LIKE '#%'
        --AND RC.UserRoleCount > 0
    ORDER BY
        U.Fullname    

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 235

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 177

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans