Module Access Saving Error

For a user in user list, removed access to a particular module.
On desk Module icon is not showing up, But on entering another module, side menu showing access removed module too.

For user roles, frappe.utils.user.get_roles(), is any way to get list of modules a user have access?

@Nitto what do you wish to do? If there’s an error, can you share the trace?

Trying to develop an app, Is any way to get user’s permitted Module access list and Roles list through Rest API or
default frappe methods.

Cleared all module access for a user, but user can access every module through ‘Explore’ icon on desk.