Hi,
To extract detailed security structure data (Roles, Duties, Privileges, and Menu Items) into a report in D365FO you have two primary standard avenues.
1: Standard Security Inquiries
You can navigate to System administration > Inquiries > Security. From this menu, you can generate and export four highly useful out-of-the-box reports:
User role assignments: Shows all roles assigned to a specific user.
Security role access: Details the exact objects (menus/tables) and permissions (Read/Update/Delete) granted by a role.
Role to user assignments: Shows all users assigned to a specific role.
Security duty assignments: Lists the specific duties nested within each role.
2: Data Entity Export
If you need raw data tables to extract security metadata, using Data Entities is the most robust approach. You can create an export project in the Data management workspace using standard entities like:
System security user role
Security role duty assignment
Security duty privilege assignment
Security privilege menu item access
Reference :
Out-of-box security reports - Finance & Operations | Dynamics 365 | Microsoft Learn
I hope this helps you. Thanks