AX 2012: Menu Items and Related Security Roles

I am currently in my third week of an AX development internship and have been given the arduous task of retrieving Roles and their associated menu item access. I can do this manually through AOT → Menu Items → right click a menu item ->Add-Ins → Security tools - > View related security roles for each menu item. Ideally I would like to list all of the menu items and the associated role access using SQL or an AOT query.

Are there any tables in AOT or SQL that list all of the menu items and hopefully a RECID or an associated key to the SecurityTask or SecurityRole tables? I also noticed that SysSecFlatDataTable contains the last viewed menu item. Is there a way to have it list all menu/role access?