Searching data via role

Hi, everyone. My problem is that I get JSON from different App where I don’t get information about the user just about the role. Can I search for data only having a role? Or if I create only one user can I search and exclude/include data that have this particular role that is assigned to a particular document or index?

@luj_ogluszacz can you confirm if you are getting JSON in a form of JWT?