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 AX (Archived)

security roles and user relations in AX 2012

(0) ShareShare
ReportReport
Posted on by

Hello, Is there a way to export security roles assigned to users in AX - either excel or SSRS?

we can export the user's list but not the security roles assigned to each user info

user A - role1, role2 etc.,

user B - role2, role 3...

or what are the tables associated to users and their security roles?

appreciate your help

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    Hi Raj,

    The table name with this information is: SecurityUserRole

    You can find it in the AOT, System documentation, Tables

    Note that the company assingments are stored in the table SecurityUserRoleCondition.

  • ewills Profile Picture
    5,990 on at

    Hi Andre, thanks. i looked at the security role table that contain the security role ID but couldn't find the table that store the name  of the security role.

  • ewills Profile Picture
    5,990 on at

    Hi Andre thanks. I found it. in fact the SecurityRole has the description that I can join with SecurityUserRole.

    thanks.

  • Suggested answer
    ewills Profile Picture
    5,990 on at

    thanks Andre

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,911 Super User 2025 Season 2 on at

    If you create a query with these tables as datasources and add it in the form "Document data sources" (Organization administration, setup, document management) it is possible to use it in Excel as well with the Office add-in.

  • MBrown1185 Profile Picture
    2,710 on at

    Hi Raj,

    If you are running AX 2012 R2 or planning to upgrade to R2, this information is available in the standard SSRS report.

    Wonder why MS didnt provide the same report for AX 2012 RTM.

    Regards,

    Michael Brown

  • pgattu Profile Picture
    15 on at

    Michael

    Can you please explain how to access this SSRS report?

  • Parth Pandya Profile Picture
    on at

    Please see the following blog entry for migrating security information in AX 2012

    blogs.msdn.com/.../migrating-security-settings-between-different-dynamics-ax-2012-instances.aspx

  • MBrown1185 Profile Picture
    2,710 on at

    [System Administration > Reports > Licensing > Named User License Counts]

    I hope you have the scheduled batch job for calculating license counts running. To check it, look for the job [Named user license count reports processing] in [System Administration > Inquiries > Batch Jobs]

    Regards,

    Michael

  • Suggested answer
    Community Member Profile Picture
    on at

    i'm not sure on the report. But this query can return the user name, role and the permission they have in each company.

     SecurityRole securityRole;

        SecurityUserRole UserRole;

        SysUserInfo  userInfo;

        OMUserRoleOrganization roleOrganization;

        OMInternalOrganization internalOrganization;

        while select ID from userInfo

            order by id asc

            outer join UserRole

            where UserRole.User == userInfo.Id

                outer join securityRole

                where securityRole.RecId == UserRole.SecurityRole

                outer join roleOrganization

                where roleOrganization.User == userInfo.Id

                && roleOrganization.SecurityRole == UserRole.SecurityRole

                    outer join internalOrganization

                        where internalOrganization.RecId == roleOrganization.OMInternalOrganization

            {

                print userInfo.Id, userInfo.Email, SysLabel::labelId2String(securityRole.Name), internalOrganization.Name ? internalOrganization.Name : "All Company";

                pause;

        }

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 AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans