How to populate a page with list/libray permissions of a SarePoint site using JQuery?

Mohamed Riyaz M 41 Reputation points
2021-05-24T11:24:16.693+00:00

I want to list all lists/libraries on a given site in a html table in a web page. I need to achieve this by client code only. No PS codes. please advise. Probably in a tale with columns such as List Name, List URL, Permission inherit Y/N, User ID/Groups - permission (read/edit/full control etc..)

Thanks

Microsoft 365 and Office SharePoint Server Development
{count} votes

2 additional answers

Sort by: Most helpful
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-05-26T08:13:29.327+00:00

    Hi @Mohamed Riyaz M ,

    You could try to use JSOM to get the list information and put them in a table, below is my sample for you:

    99765-getlists.txt

    Test results:

    99766-image.png

    1 person found this answer helpful.
    0 comments No comments

  2. Mohamed Riyaz M 41 Reputation points
    2021-05-26T08:24:46.263+00:00

    That's great. Only one more thing is missing . I need to see the actual permission given to this list such as User ID/Groups - permission (read/edit/full control etc..) in another column. It seems I need to the RoleDefinitions of each of the lists.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.