Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to get all companies user names and roles in AX2012

(0) ShareShare
ReportReport
Posted on by

Hi All,

We are able to get the users list and roles from one company, but we have n-number of companies and need to get all users and roles from all companies from single code run instead of changing the company every time.

Is there any way to get the data from all companies , please advise.

Regards,

Akbar

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to get all companies user names and roles in AX2012

    Thank you Girish.

  • Verified answer
    GirishS Profile Picture
    GirishS 27,821 Moderator on at
    RE: How to get all companies user names and roles in AX2012

    In that case you need an customization.

    Thanks,

    Girish S.

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to get all companies user names and roles in AX2012

    Thanks Girish, but the data is coming as user wise, not in the close to our requirement :

    User name   --  User roles  -- Company  --  Enabled

  • Suggested answer
    GirishS Profile Picture
    GirishS 27,821 Moderator on at
    RE: How to get all companies user names and roles in AX2012

    Yes, you can ran the report and export the report to pdf or excel.

    After running the report >> on the top right corner you have the option to export.

    Thanks,

    Girish S.

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to get all companies user names and roles in AX2012

    Thank you Girish,

    we have written a job to get the user details and associated roles in AX2012.

    You have suggested for D365FO like below :

    D365 FO - There is a report named User role assignments under System Administration >> Inquiries >> Security >> User role assignments.

    is it possible to get the details in Excel/PDF format like below in D365FO without writing a job as it will be very lengthy process to deploy to Prod and run the job , if we get the few columns related:

    User name   --  User roles  -- Company  --  Enabled

    Please advice.

    Regards,

    Akbar

  • GirishS Profile Picture
    GirishS 27,821 Moderator on at
    RE: How to get all companies user names and roles in AX2012

    In D365 FO - There is a report named User role assignments under System Administration >> Inquiries >> Security >> User role assignments.

    If this report is available in Ax 2012 - You can filer the company records using Record to Include tab on the dialog form - You can add Company field as range to UserInformation table and add all companies.

    Thanks,

    Girish S.

  • GirishS Profile Picture
    GirishS 27,821 Moderator on at
    RE: How to get all companies user names and roles in AX2012

    Check whether there is DataareaId field in SecurityRole and SecurityUserRole table. If yes, you can add the CompanyInfo table using DataAreaId as the relation.

    If there is no DataAreadId field then there is no possibility of adding company name to it.

    Thanks,

    Girish S.

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to get all companies user names and roles in AX2012

    Thank you very much Girish, got it now.

    Is it possbile to get the company name in the veiw, like with all company names.

  • GirishS Profile Picture
    GirishS 27,821 Moderator on at
    RE: How to get all companies user names and roles in AX2012

    You need to add that fields from query to the view fields. If there are no fields in the view it will throw above error.

    Thanks,

    Girish S.

  • Akbarpasha Profile Picture
    Akbarpasha on at
    RE: How to get all companies user names and roles in AX2012

    Thank you Girish,

    I just created a View using SysSecRolesForUser, when i am trying to open View it is throwing the below errror:

    You are not authorised to access table ‘UserRoles’ (UserRoles). Contact your system administrator.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,492 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans