Notifications
Announcements
No record found.
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
Hi Akbarpasha,
In Ax 2012 there is a query named "SysSecRolesForUser". That query has "Allow cross company" property set to yes.
So, you can create a view from that query and use that view to get the usernames and roles against all the companies.
Thanks,
Girish S.
Thank you Girish,
Can we get the user names as well with this query.
There is no username field in the query. You have only user Id field in the query. If you want, you can duplicate this query and add a "DirPersonUser" table as a DataSource to the query - Relation with SecurityUserRole table on the query..
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.
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.
Thank you very much Girish, got it now.
Is it possbile to get the company name in the veiw, like with all company names.
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.
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.
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.
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 660 Most Valuable Professional
André Arnaud de Cal... 549 Super User 2025 Season 2
Sohaib Cheema 307 User Group Leader