How do I get the permission scheme for a role or group?

When I get a user’s details using the following method (Jira 9.10.0), it returns fields including “groups” and “applicationRoles”. How do I use either of these fields to get a list of specific permissions that the user is entitled to?

Thank you in advance.