Control Room API - List roles

  • 11 August 2022
  • 2 replies

Badge +5


I wanted to list roles with filter so I wrote the parameters

but it keeps returning the failure response:


"Unable to locate Attribute with the the given name [countPrincipals] on this ManagedType [com.automationanywhere.common.model.Identity]"


It seems there's nothing wrong with countPrincipals object according to this document:>


Could you please check why it fails?


note: The below is what I wrote as a parameter

























2 replies

Userlevel 4
Badge +7

Hi @Eunji Lee​ ,


I've tested this out from my end as well and faced the same issue.

There is a workaround, one that involves leveraging Postman's JS capabilities.


In Postman, you can Visualize the response by providing a skeletal HTML structure for the data to cling onto.


Here is a snippet of the code used in the Test Tab:

var template = `

    <table bgcolor="#FFFFFF">




            <th>User Count</th>



        {{#each response}}









var filteredResponse = pm.response.json().list.filter(x => x.countPrincipals===1);


pm.visualizer.set(template, {

    response: filteredResponse




And here is a screenshot of the output in the Body -> Visualize Tab:


Kind Regards,

Ashwin A.K


Badge +5

Hi @Ashwin A.K​ ,

Thank you so much for your answer. It helped me a lot.