Javascript: Query all users with read permission to specific list

Is it possible to use javascript to retrieve all users with read permissions to specific list? This (http://www.c-sharpcorner.com/UploadFile/anavijai/how-to-get-all-the-users-from-site-group-in-sharepoint-2013/) shows how to get users from group but what
about list. All users in list may not exist in spgoups.

Hi,
If with Server Object Model which is executed in server side, in the
SPList object, there is a
RoleAssignments property can help to get what you want without looping through all the users in site:
public static void getPermissionsOfList()
using (SPSite site = new SPSite("http://sp"))
using (SPWeb web = site.RootWeb)
SPList list = web.GetList("/Lists/List1");
SPRoleAssignmentCollection roles = list.RoleAssignments;
foreach (SPRoleAssignment role in roles)
Console.WriteLine("~");
Console.WriteLine("Name: " + role.Member.Name);
SPRoleDefinitionBindingCollection bindings = role.RoleDefinitionBindings;
XmlDocument doc = new XmlDocument();
doc.LoadXml(bindings.Xml);
//Console.WriteLine(doc.InnerXml);
XmlNodeList itemList = doc.DocumentElement.SelectNodes("Role");
foreach (XmlNode currNode in itemList)
string s = currNode.Attributes["Name"].Value.ToString();
Console.WriteLine("Permission Level: " + s);
However, when comes to JavaScript Client Object Model, as there is no such property provided, I suggest you take the solution provided in my previous post for a try.
Thanks 
Patrick Liang
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]

Similar Messages

  • How to make feedback visible to all user having read permission

    hi,
        for a document , a user is giving a feedback. my need is how to make that feedback visible to all user. all user are having read permission only.
      help will be appriciated
    Regards,
    Shanthakumar.

    Hi,
    Normally we use feedback as an explanation by an approver to the previous approver about his action on the doc( reject/approve).
    I think you want ur users to view the doc and then give suggestions to make it better and these comments should be approved and then made visible.
    I replied on one such thread earlier too.
    Please have a look at this [thread|https://www.sdn.sap.com/irj/sdn/thread?threadID=816692]
    I hope it helps.
    Regards,
    Sumit

  • Sharepoint Permissions Application user with read only permissions

    Friends,
    I am trying to create a separate permission Group for an Executive(Department) Team who can access all the documents and lists in the portal with only read permissions because they need to see all the documents and lists in the libraries.
     I can add them in to  SP_Application_User group but i don't want them to edit the documents.
    If i create a new group and set a separate permission level with read only setting, they cannot access all the documents in the document libraries and lists because some of the document libraries and lists have separate permission which overrided parent permissions.
    Hope i will get help from any of you.
    Thanks in advance,
    Regards,
    Chakri

    Hi,
    For your issue, you could add the users to Central Administration > Application Management > Policy for Web Application and grant Full Read permissions.
    With the configuration, these users have Read permission to the whole web application.
    -lambert
    Sincerely,
    Lambert Qin
    Posting is provided "AS IS" with no warranties, and confers no rights.

  • How to find if a user with fullaccess permission used a mailbox ?

    Hi,
    We used Exchange 2010 in my organisation
    We defined a lot of generic mailboxes and some of them have a lot of users with fullaccess permission
    We think that some of them don't really used this mailbox
    Is it possible to find, with powershell, information of usage of a mailbox by users which have this fullaccess permission ?
    Thanks

    Hi,
    Get-MailboxPermission <Identity>
    or
    Get-Mailbox | Get-MailboxPermission | ?{($_.AccessRight
    s -eq "FullAccess") -and ($_.User -like 'DOMAIN\user') -and ($_.IsInherited -eq $false)} | ft Id*

  • Find all users with deleagtion

    Hello,
    I am looking for a powershell script that will report ( csv ) on all users with delegation in the O365 environment. Any help would be appreciated.

    Hey
    This can help you:
    http://community.spiceworks.com/topic/449787-exchange-2010-list-delegate-full-access-information-for-all-users
    Regards.

  • Query all users when they last logged on?

    Hi,
    how can I run a script to query all users to see when they last logged on. I want to be able to select a cut off date to exclude current users.
    Any ideas?
    Thanks
    Paul

    Try using the 'last' command from the Terminal, or read the wtmp logs directly.
    (33318)

  • How to create a user with read only access for ESB / BPEL Console

    I need to create a user with read only access to ESB Console & BPEL Console. I have created a user
    (esbreadonly) and assigned ascontrol_monitor role but user is still able to
    delete services from ESB systems (such as DefaultSystem). Is there any way to
    create a user that has strickly read only access to ESB Console & BPEL
    Console
    Thanks
    Dinesh Patel

    Check out this post.. I'm in the process of testing.
    http://chintanblog.blogspot.com/2007/12/i-saw-numerous-people-asking-about-bpel_290.html

  • Users with read access to the site unable to view Managed Metadata Navigation

    Hi everyone,
    I created a Managed Metadata service and created group, term-set and terms
    I gave read access to users
    I set up navigation to use Managed Navigation
    I am logged in as farm admin and able to view the navigation when i browse site. But user are not seeing navigation.
    One thing i noticed is when i give users full access or designer access to site they will be able to see the navigation. but i don't want to give users full access or designer access to the site.
    How can users with read only access to site can view Managed Metadata Navigation...Please help?

    Hi Sunil,
    Have you given your users permissions to actually read the MMS data from the service application?
    http://technet.microsoft.com/en-us/library/ff625176.aspx covers permissions on the MMS.
    Regards
    Paul.
    <<edit>> On reflection you might be hitting the issue in this Stackexchange post..
    http://sharepoint.stackexchange.com/questions/75636/permissions-and-managed-metadata-in-navigation Is yours behaving the same way?
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • List all users with full control on a SharePoint 2013 Sub site from SharePoint Object Model in C#

    If I have a sub site URL and a user with Site Admin, can I list all users in that sub site that have Full Control at that level?
    Any C# code sample?

    Still you can do that, just pass the subsites to your code and from their you can find the users dynamically.
    You could also use SPWeb.Users property to get users assigned to a subsite
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.users(v=office.15).aspx
    alternatively you can also use SPWeb.SiteUsers to get all users
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.siteusers(v=office.15).aspx
    other APIs of help-
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.associatedmembergroup(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.associatedownergroup(v=office.15).aspx
    http://sharepoint.stackexchange.com/questions/101671/object-model-list-all-users-with-full-control-on-a-sub-site-in-sharepoint-2013
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

  • Retrieve all users with attributes from AD

    hi,
    i'd like to retrieve all users with their attributes from AD. I can connect to AD and i 'm able to retrieve entries from a group with the member class given in this forum.
    But my problem is i would like to retrieve users directly from the Users container
    thanx for help

    i solved one part of my problem.
    But, now i have to get all attributes for each users and i couldn't find them. The getattributes method doesn't return anything (i 'd like to retrieve the first name, last name, adress ...)
    thanx for help

  • Report which would collect all users in STAD running an specific program

    Hi
    How could I make an report which would collect all users in STAD running an specific program daily. The issuse is that this program is not available in sm20. How could I then send this list to list of receipients?
    I have in mind to "submit "stad" but it is long time ago I used this and I do not have access to that source
    THX

    we found solution via a job runned report with variant

  • Authentication prompt issue when opening an office file in a document library with read permission for domain users

    An user as part of the domain users tries to open an office file from a document library but he got an authentication prompt asking him to authenticate. Domain users has only access to this library and not to the whole site. This uses to work in SharePoint
    2007 without any problem but not in SharePoint 2013, we didn't have a workflow on SP2007.
    Domain users has read access to only this document library in the site, but he shouldn't get an authentication prompt since he is part of the domain users and he is not trying to modify the document, he can open the document but gets two prompts, he can't
    also see the list using explorer view since nothings appears using the explorer view.
    Now, when opening the file, we can see..Updating Workflow Status, but we don't have any workflow working on this site or library, event any feature related to workflow.
    If we go to the event viewer in the server, we find this information,
    I also checked this thread but I couldn't find this scenario.
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/91bc770b-bb70-4885-a4ad-a243edb88753/event-id-8026-workflow-soap-getworkflowdataforitem-failed-doc-library-no-workflow?forum=sharepointgeneralprevious
    I also created another list with the same permissions and using other office files but got the same behavior.
    Now, we have migrated this site from SP2007 to SP2013.
    Any ideas?

    OK, I am going to throw out a lot of ideas here so hopefully they get you closer to a diagnosis. Hang on :)
    Does it happen to work for some users but not others? If so, try logging in on the "good" computer with the "bad" username. This will tell you if the problem is related to the end-user's system. Also, once the user downloads a document
    successfully can they open and work on it in Word? Also, does the document library have any custom content types associated with it or does it just use 'Document'?
    I notice that there are other folks on the web that have run into this same problem and the similarity seems to be that they are either on SharePoint 2007 or have upgraded from 2007. Did this doc library start out as a 2007 library?
    What you might want to do is this: Make a site collection from scratch in 2013 (or find one that you know was created in 2013). Choose team site (or whatever you want) for the root web and set up the security the same way you have it on the malfunctioning
    library. Now, use windows explorer to copy and paste some of the documents to the new location. Be sure you recreate any needed content types. Now test it from the troubled user's computer.
    I'm thinking there may be something that is different about the library since it was migrated through various versions and updates since 2007. I've sometimes found that there can be problems (especially with user profiles but that's a different story) with
    things that go through this evolution.

  • How to List view web part to display document library for only users with access permission

    Hi
    I am trying to accomplish this requirement but I don't know if that is possible or how to get there.  Any suggestion or advice are helpful.
    On a site collection, I have several document libraries,  with each library have unique permission to a few user or SharePoint group.
    I want to create a web part page and make that the site home page.  On this web part page, I want to create a Content Search Web Part to list the content of the document library that the logged on users have permission to see. 
    Is this possible with CSWP or is there anything easier or if it is not possible at all,  please advise.
    Thanks
    Swanl

    Hi ,
    Based on your description, my understanding is that you want to create a Content Search Web Part to list the documents that the logged on users have access permission.
    It is feasible with CSWP, you can follow the below step:
    Edit Content Search Web Part->Change query-> Select a query: Items matching a content type (System); Restrict by app: Current site collection; Restrict by content type: Document.
    Best Regards,
    Lisa Chen
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]

  • How to set permissions like "For all users" with Sandbox

    Hello!
    Hello!
    I am using Sandbox for Mac OS X Leopard and I've got a question to you:
    How can I set up a folder to behave like the For all users folder in the users directory?
    Greetings

    Well, sandbox sets ACL's not posix permissions. The sticky bit is a posix permission. Sand box will allow you to do something similar to the sticky bit using ACL's, but the exact duplication of the sticky bit is not possible, but something just as useful or more useful can be easily implemented.
    To set the sticky bit you will need an app called FileXaminer or the Terminal.app command line.
    to set the sticky bit simply put "1" in front of the the permissions number when you run chmod on the command line, here is an example:
    chmod 1775 /users/data/shared #assigns permissions 775 and the sticky bit#
    chmod 775 /users/data/shared #assigns permissions 775 without the sticky bit#
    note: note actual use of the chmod and chown commands will, in most cases require the sudo (super user do) command to be used with them. example:
    sudo chmod 1775 /users/data/shared #assigns temporary super user priviledge#
    The way I set my shared user's directories with ACL's is this:
    first I created folder /users/data -permissions=777 (everyone).
    I had three users so I created folders for each in /users/data:
    /users/data/user1 #this is just example-substitute real user name#
    /users/data/user2
    /users/data/user3 #etc,etc,#
    set the posix permission on each user folder 700 (owner:read,write,execute)
    set the owner and group on each one accordingly:
    chown user1:staff /users/data/user1 #substitute real user name#
    chown user2:staff /users/data/user2
    chown user3:staff /users/data/user3 #(etc,etc)#
    Now each user has their own data folder they can read and write to at will (when they are logged in to their user account).
    They can safely create and maintain their data and no one can delete it.
    Since these are shared data accounts. other users will need to read the data, this is where the ACL's come in.
    You will need to use Sandbox to place ACL's for each allowed user, on each of the user directories:
    0: user:joe inherited allow list,addfile,search,add_subdirectory,readattr,writeattr,readextattr,writeextattr,readsec urity,file_inherit,directoryinherit
    1: user:mary inherited allow list,addfile,search,add_subdirectory,readattr,writeattr,readextattr,writeextattr,readsec urity,file_inherit,directoryinherit
    2: user:sue inherited allow list,addfile,search,add_subdirectory,readattr,writeattr,readextattr,writeextattr,readsec urity,file_inherit,directoryinherit
    Basically with the above ACL's the only thing the allowed user can't do is delete files. They can copy files, they can add files, etc. This behavior is somewhat similar to what can be accomplished with the sticky bit, but much more controlled and structured. That is the beauty of using ACL's.
    Using SandBox you can taylor the permissions as you see fit for each every user. You can set permissions for an administrator to delete files as well. You can take away or add permissions for each user as you see fit. let your imagination be your guide.
    ACL's weren't meant to replace posix permissions, but rather to allow administrators to fine tune user permissions.
    Kj

  • How to Share a document with Read Permission Level?

    Hello
    We are creating SharePoint Groups right now, and we have a lot of people in a group called Readers with the Read Permission Level. I have noticed that readers are unable to share documents. When we select a document and click on the ellipses and click "Share"
    we get this message
    "Sorry something went wrong"
    "Only a limited set of people are allowed to share this content"
    I have noticed that they only way to get this share functionality is to have full control permission which obviously we do not want to give our users.
    Is there anyway around this?
    Thanks in advance 

    Hi,
    there are multiple solutions to it
    Option 1
    the best way is to create a designer workflow with initiation form
    use the below link for how to create workflow with designer
    https://www.webucator.com/tutorial/advanced-microsoft-sharepoint/creating-custom-workflows-with-sharepoint-designer-2013.cfm
    Than using designer you can create a ribbon menu and on click of it you can initiate workflow.
    http://www.abelsolutions.com/totm/creating-a-custom-action-in-2-steps-with-sharepoint-designer/
    Option 2
    Create a cutom ribbon from above link and you can initate a javascript method.
    write code in javascript to send email.
    Personally i would suggest workflow as you can achieve so many thing with workflow without coding 
    Whenever you see a reply and if you think is helpful,Vote As Helpful! And whenever you see a reply being an answer to the question of the thread, click Mark As Answer

Maybe you are looking for

  • Panasonic NV GS120

    I recently bought a MacBook and am wondering, seeing as there no firewire input, the best way/ways to get my mini dv files in to the laptop to edit in Imovie? So fare all I've come up with is capture on my windows based pc as an mpeg then import to m

  • Print to Video, Playback Output Video for 1080i60 Codec?

    Could someone who is using Final Cut Express 4.0 please check the characteristics under Easy Setup / HDV-Apple Intermediate Codec 1080i60, as to whether FCE 4.0 provides a "Playback Output Video" capability. In FCE 3.5, the pull down menu: Final Cut

  • What Can Be Done To Minimize "Loading" Times

    We all know that Lightroom loads a rough very of the photo before loading the full detailed version. Is there anyway to speed that up? I've tried leaving Lightroom running to pre-load all the photos in my film strip, but it only seems to do final loa

  • Motion Titling and LiveType

    Hi there, I currently use iMovie just to produce slideshows for wedding photographers, and am thinking about upgrading to Final Cut so that I can make them that bit more professional looking and expand a little as a result. One thing I don't yet util

  • [OT] Rant at the forum

    Every dang time i come to this forum, what do i see? Welcome to our online community. You can browse directly in any of the forums below, or login or register to start posting your own messages. Notice the new look? We've updated to a fresh new visua