I'm trying to figure out how to get a list of all the groups that are allowed to edit/read a document library. I will need the name of each group and which permissions it has (edit or read).

I used SPServices to make an array of all subsites and all document libraries for each subsite. This works just fine, I can get the output in my console. But now I wish to loop through all document libraries and store the permissions per document library in an array. So far with no success. I cannot seem to find a way to see which groups are linked to which library, and which permissions (mostly unique) they have.

Is there such a way? Or is this simply not possible? Because when I check out an individual document library and want to manage its permissions, I can see a list of groups and which permissions each group has on that document library.

1 Answer 1


You will need to use the SiteData service. A basic example:

      operation: "SiteDataGetList",
      strListName: "Announcements",
      async: false,
      completefunc: function(xData, Status) {}

This will return a node sListMetadata. If the list inherits permissions it will have an attribute of <InheritedSecurity>true</InheritedSecurity>. If the list is using custom permissions, it will have a <Permissions> node and give all the permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.