title: Get User/Group Permissions for List using javascript(ecmascript)
body: <p>I am trying to use the javascript object model to retrieve a list of users/groups for a list and their permissions at the list level. So far I have this which returns a member object but I cant get any information about the member. When I try to use rAssignment.get_member().get_id(), or rAssignment.get_member().get_title() I get an error.</p>
  
  <pre><code>        //Get List Permissions
          function getListPerms() {
              var clientContext = new SP.ClientContext();
              var siteColl = clientContext.get_site();
              var site = clientContext.get_web();
              listSecurableObject = site.get_lists().getByTitle($("[name='ListSlct']").val());
              listRoleAssignments = listSecurableObject.get_roleAssignments();
              clientContext.load(listRoleAssignments);
              clientContext.executeQueryAsync(Function.createDelegate(this, this.getListPerms_onQuerySucceeded),Function.createDelegate(this, this.getListPerms_onQueryFailed));
         }
         function getListPerms_onQuerySucceeded() {
              var listPerms="";
              listPerms += '&lt;table border="1"&gt;';
              listPerms += '&lt;tr&gt;';
              listPerms += '&lt;td align="center"&gt;ID&lt;/td&gt;';
              listPerms += '&lt;/tr&gt;';
              var listPermsEnumerator =  this.listRoleAssignments.getEnumerator();
              while (listPermsEnumerator.moveNext()) {
                  var rAssignment = listPermsEnumerator.get_current();
                  listPerms += '&lt;tr&gt;';
                  listPerms += '&lt;td align="center"&gt;' + rAssignment.get_member() +  '&lt;/td&gt;';
                  listPerms += '&lt;/tr&gt;';
              }
              listPerms += '&lt;/table&gt;';
              document.getElementById('listPermsTable').innerHTML = listPerms;
         }
         function getListPerms_onQueryFailed(sender, args) {
             alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
         }
  </code></pre>