Hm, getIdentityRoles and matchIdentityRoles could be useful?