title: How to show all users who are in a group - IBM Cognos 10 SDK
body: <p>I want to show all users who are in groups and what role they have.<br>
  Now I can list all the users with "//account", all the groups with "//group" or all roles with "//role".</p>
  
  <p>This is how I get all users/groups/roles:</p>
  
  <pre><code>propEnum[] props = new propEnum[] {
  propEnum.searchPath, propEnum.defaultName,};
  
  sort[] s = new sort[] { new sort() };
  s[0].order = orderEnum.ascending;
  s[0].propName = propEnum.defaultName;
  
  queryOptions queryOptions = new queryOptions();
  
  StringBuilder output = new StringBuilder();
  
  // Look for all the users.
  output.AppendFormat("\nUsers:\n");
  
  searchPathMultipleObject userPath = new searchPathMultipleObject();
  userPath.Value = "//account";
  
  baseClass[] bc = cBICMS.query(userPath, props, s, queryOptions);
  
  if (bc.Length &gt; 0)
  {
      foreach (baseClass report_item in bc)
      {
          output.AppendFormat("DefaultName:        {0}\n", report_item.defaultName.value);
          output.AppendFormat("SearchPath:         {0}\n", report_item.searchPath.value);
      }
  }  
  </code></pre>
  
  <p>If I want to show groups instead of users I need just to change <code>userPath.Value = "//group";</code> or <code>.."//role";</code> for roles.</p>
  
  <p>Has anyone an idea? </p>