Get the item level permission in sharepoint 2013 uisng rest api

I created the test list  and i created the 5 items in that list.
I stopped the item level permissions.
I shared the list item with userA.
In the rest api response, it giving the other users also (means user who is not having permission to the item).
I am using below rest query
/_api/Web/GetFileByServerRelativeUrl('/site/Lists/test/1_.000')?$expand=Versions,Author,ModifiedBy,ListItemAllFields/RoleAssignments/Member/Users,ListItemAllFields/FieldValuesAsText,ListItemAllFields/ParentList

Hi,
Following are the steps, I performed:
After adding the item in the list, I went into list item permissions and clicked on stop item permissions. Then I selected all the permissions which got carried over to the item and clicked on "Remove user permissions" in the ribbon. After that
I clicked on Grant permissions in the ribbon and shared the item with one user. Note that last action can also be performed by going back into the list and selecting the item and click on Share.
Finally, I ran the above REST query and returned the user with whom the item was selected and also the system account (which is expected, as admin will have access.
You can try shortening your query as well
 /_api/Web/GetFileByServerRelativeUrl('/site/Lists/test/1_.000')?$expand=ListItemAllFields/RoleAssignments/Member/Users
This will return the relevant user permissions and response will contain lesser data and hence will be easier to read. Lastly, try intercepting the traffic
using fiddler, as again it will in reading the response.
Thanks,
Nadeem
Please remember to up-vote or mark the reply as answer if you find it helpful.

Similar Messages

  • Workflow for Changing Item Level Permission in SharePoint 2013 (Office365)

    I am using OOTB Tasks List in SharePoint 2013 (O365). Now my scenario is like this:
    I have two user groups: 1.Sales Managers 2. Sales Executives
    Sales Managers can create & assign task to Executive.  I want something like Sales Managers Can view all tasks (Which is by default view of tasks list i.e. perfact) but Executives can see only their tasks assigned to them. How can I achive this?
    Can I use WorkFlow for this to Change item level permission or to assign permission to assigned to user? or JS
    Can anyone have proper solution? thanks

    1. make 2 SharePoint group 1>Sales Managers 2>Sales Executives
    2. Show 2 WP of same task list in same page.
    3. Use Audience Target for Sales Managers Sharepoint group in first Webpart property. (All
    Iten view)
    4. Show "My Task" view (assign to =[Me]) Bottom WP for same task list and use Audience Target for Sales Executives. Or if you want it to see
    Sales Managers as well, the dont use any Audience Target.
    Bottom line - SharePoint group use in Audience Target will do the trick. OOTB
    Regards Sudip Misra [email protected] +1-412-237-5435 Pittsburgh, PA

  • Get the Version history of a sharepoint 2013 Custom List item

    Hi All,
    I am having doubt to retrieve the field version information with the comments.
    For this field i am done like this
    1.Creating a custom list
    2.And enable versioning for the list
    3.And add a field with field type 'Multiple Lines of Text' and in the Addition Column Settings section 'select yes radio button option in 'Append changes to the Existing text'.
    4.If we done like this the changes to the list item are available outside of field control.
    Can any one help me regarding this field to get the all the versions of list item along with modified data.

    hi Asatish,
    Thanks for posting your issue, Kindly browse the below mentioned URLs to know about the fixes of this issue
    http://berg-henry.blogspot.in/2010/11/custom-list-form-with-version-history.html
    http://somnathmatere.blogspot.in/2013/10/sharepoint-2010-custom-display-form.html
    http://blog.qumsieh.ca/2009/01/29/understanding-the-append-changes-to-existing-text-option/
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Workflow not triggering when changing Item-level Permissions in Sharepoint 2013 list

    Scenario:
    We have a custom list in Sharepoint 2013 that we use for Case Management. We have a workflow that triggers on a created item generated from an email. The user then gets a reply with a link to his own case.
    I want the users only to be able to see their own cases and no one elses.  When I change this under
    Advanced Settings under List Settings and
    Item-level Permissions and set them to Read items that were created by the user
    and Create items and edit items that were created by the user
    the workflow doesn´t trigger.
    How can I resolve this? I've tried every possible out-of-the-box permissions but with no result. Help!
    Thanks in advance!
    // Browncreek

    When you're testing , remember you cant trigger declarative workflow from the System Account - you need a general user account for auto-trigger workflows.  Good luck!
    Chris McNulty MCSE/MCTS/MSA/MVTSP | blog http://www.chrismcnulty.net/blog | twitter @cmcnulty2000 Microsoft Community Contributor Award 2011
    Hi, I have the same problem. Except that I am not using an email to create a new item. The item is created by members of a SharePoint group that have Contribute access to the list. When use the same settings i.e.
    Read items that were created by the user and Create items and edit items that were created by the user,
    the workflow does not trigger. If I set it back to Real all items and Create
    and Edit all items, it triggers the workflow.
    Please help me resolve as I have rolled this out to pilot users and am having this trouble.
    Thanks,
    Vishal

  • How can I access user permission for specific items in Sharepoint 2013 via REST API?

    I want to access user permissions for specific items like lists, documents, folders etc. via the REST API.
    Currently I am hitting the following endpoint:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/getUserEffectivePermissions('win-5a8pp4v402g\\Sharepoint User 2')
    However the response looks like this:
       "d":
           "GetUserEffectivePermissions":
               "__metadata":
                   "type": "SP.BasePermissions"
               "High": "0",
               "Low": "0"
    I cant understand why high and low are both 0? I have added the user to a specific group. Also this is the same result for each of the users. Another thing to note is that I havent added the "Guest" user in the sharepoint server. So when I hit the endpoint for the Guest user, it still shows the same response. So I know there is something I am doing wrong.I want to access permission of a user for a specific item, say a document using the REST API. Can someone tell me how? What would be the endpoint?

    Thanks for the reply. Although this works for Lists, I need to get permissions of documents too. Here is what I have tried:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/GetFileByServerRelativeUrl('/sharepoint_test/site_1/Documents/file1.txt')/GetUserEffectivePermissions(@user)?@user='i%3A0%23%2Ew%7Cwin-5a8pp4v402g%5Csharepoint%20user%201'
    And the response is:
       "error":
           "code": "-1, Microsoft.SharePoint.Client.ResourceNotFoundException",
           "message":
               "lang": "en-US",
               "value": "Cannot find resource for the request GetUserEffectivePermissions."
    Clearly this doesnt work for a file. Whats wrong?

  • Get list items using spservices for sharepoint 2013

    Hi,
    I have a requirement like below.
    I have 2 sharepoint custom list with some columns.
    List1:listA
    List2:listB
    Now when i open the listB new item form i want some of the field values from listA should auto populate in Textboxes of listB new form.
    Is there any ways to implement this?
    Regards,
    Poovi

    Hi Poovi,
    You can achieve this using jQuery to get the SharePoint list items. Refer the below articles. It has explained how to get list items using jQuery and auto populate a text-box from a list item as a source.
    You can put this code in list forms through SharePoint Designer. The articles explain about auto populating text box of web part but similarly you can implement it for list form, because nevertheless the text boxes are same.
    http://www.c-sharpcorner.com/UploadFile/sagarp/sharepoint-2010-jquery-autocomplete-textbox-containing-list/
    http://tomvangaever.be/blogv2/2011/07/sharepoint-2010-autocomplete-with-list-items/
    Please remember to click 'Mark as Answer' if the reply answers your query or 'Upvote' if it helps you.

  • Sharepoint 2013 Online REST API - authorize

    In the SharePoint 2013 Online workflow, trying to add a web service to copy a item attachment to the document library.  However the return error code is unauthorize.  Even if the web service call is wrapped in APP
    STEP, same error occurred. 
    An example of the URL of the webservice call is:
    https://hosturl/sites/myOffice/_api/web/lists/getbytitle('MeetingRequest')/items(89)/AttachmentFiles('license.txt')/copyTo(strNewUrl='https://hosturl/sites/myOffice/_api/web/getfilebyserverrelativeurl('/sites/myOffice/testdoc/license.txt')',bOverWrite=true)
    Anyone could get it work in SPO workflow?
    Thanks.

    Hi,
    Please make sure that the account you use has access the list and library.
    In the workflow editor, we need to set the header like this:
    "Accept": "application/json; odata=verbose",
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    Then set the HTTP method as “HTTP POST” in the “Call HTTP Web Service” action:
    Feel free to reply with the test result.  
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How to write FQL in querytext field in SharePoint 2013 Search REST API?

    I am having double quote symbol issue in my search app, same as http://www.silver-it.com/node/127 says.
    To avoid this issue, I am trying to understand: is it possible to do search request in FQL to the 2013 Search REST web service?
    I know that we can use KQL in querytext, like
    http://sp2013/sites/search/_api/search/query?querytext='Title:"123#123"'&enablefql=false&rowlimit=100&selectproperties='Title'
    But is it possible to write it in FQL? I found that there is a enableFQL property we can set in REST API. What's the function of it?
    http://sp2013/sites/search/_api/search/query?querytext='test'&enablefql=true&rowlimit=100&selectproperties='Title'
    http://sp2013/sites/search/_api/search/query?querytext='string("test case",mode="simpleall")'&enablefql=true&rowlimit=100&selectproperties='Title'
    Right now, the two above requests just give me this error.
    HTTP/1.1 500 Internal Server Error
    {"error":{"code":"-1, Microsoft.Office.Server.Search.REST.SearchServiceException","message":{"lang":"en-US","value":"We didn't understand your search terms. Make sure they're using proper
    syntax."},"innererror":{"message":"We didn't understand your search terms. Make sure they're using proper syntax

    http://sp2013/sites/Search/_api/search/query?querytext='string("cat+dog+fox",+mode="and")'&enablefql=true&rowlimit=100&selectproperties='Title'&sourceid='ad5a2ca4%2D91eb%2D44de%2D98f7%2D9af1c1eefef3'
    The response is:
    HTTP/1.1 400 Bad Request
    {"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."},"innererror":{"message":"Guid should contain 32 digits with
    4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).","type":"Microsoft.SharePoint.Client.InvalidClientQueryException","stacktrace":"   at Microsoft.SharePoint.Client.Rest.EdmClientValue.ConvertTo[T]()\r\n   at Microsoft.Office.Server.Search.REST.SearchServiceServerStub.query_MethodProxy(SearchService
    target, ClientValueCollection xmlargs, ProxyContext proxyContext)\r\n   at Microsoft.Office.Server.Search.REST.SearchServiceServerStub.InvokeMethod(Object target, String methodName, ClientValueCollection xmlargs, ProxyContext proxyContext, Boolean&
    isVoid)\r\n   at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, ClientValueCollection args, ProxyContext proxyContext, Boolean& isVoid)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.InvokeMethod(Boolean
    mainRequestPath, Object value, ServerStub serverProxy, EdmParserNode node, Boolean resourceEndpoint, MethodInformation methodInfo, Boolean isExtensionMethod, Boolean isIndexerMethod)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPathMember(Boolean
    mainRequestPath, String path, Object value, EdmParserNode node, Boolean resourceEndpoint, MethodInformation& methodInfo)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.GetObjectFromPath(Boolean mainRequestPath, String path, String
    pathForErrorMessage)\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.Process()\r\n   at Microsoft.SharePoint.Client.Rest.RestRequestProcessor.ProcessRequest()\r\n   at Microsoft.SharePoint.Client.Rest.RestService.ProcessQuery(Stream
    inputStream, IList`1 pendingDisposableContainer)"}}}

  • Item level permission on workflow task List using sharepoint designer 2013

    Hello All,
    I have created a custom approval workflow. Workflow create a Task in Tasks List.  Now suppose A task is assign to user1. 
    User2 should not able to edit\approve\reject the item.
    How to give item level permission using SharePoint designer in SharePoint 2013 workflow.
    SharePoint 2013 workflow doesn't have impersonation steps also.
    Please suggest how to give permission on task list based on assigned To field.

    In order to change permissions on a list item you'd need a sharepoint 2010 workflow according to http://msdn.microsoft.com/en-us/library/jj728659.aspx
    Unfortunately this functionality is not available in SharePoint 2013 workflows :-(
    The impersonation step still exists, but it is now called "App Step" in the SharePoint Designer 2013 Ribbon. This step is disabled, though, until you activate a web site feature called "Workflows can use app permissions"

  • Sharepoint 2007 Setting Item level permission

    How do i set item level permission using SharePoint 2007 workflow. As I've been working on employee leave management, time sheet entry and attendance, quite similar to Orange HRM features...And also being a beginner who never had any hands on SharePoint.
    It would be really grateful if anybody comes up with all the help for me.
    Employees should not be able to see each other's personal information like contact details, email addresses, etc other than the Admin. How do i do that step by step automatically using a workflow using SharePoint 2007....?
    Thank You.

    you can use the http://spdactivities.codeplex.com/ Grant Permission on Item workflow activity from codeplex and build the workflow.
    Below are the few examples
    http://sharepointgeorge.com/2010/item-level-permissions-infopath-forms-sharepoint-designer-workflows/
    http://www.codeproject.com/Articles/18415/Custom-Activity-Workflow-for-implementing-Item-Lev
    hope this helps.
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • How check page level permission on SharePoint pages library using JSOM

    Hi,
    Can anyone tell me how check page level permission on SharePoint pages library using JSOM.
    Tanks in advance .
    Regards,
    Hari
    Regards, Hari

    Hi,
    According to your post, my understanding is that you want to check the page level permission on SharePoint Pages library via JSOM.
    I have made a simple code demo to check whether current user has edit permission for the pages in Pages library, it works like a charm.
    You can re-write it to fit your environment.
    <script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    var web;
    var list;
    $(function(){
    $("#Button1").click(function()
    console.log(1);
    getListItems('Pages',success_Items,error_Items);
    console.log(2);
    function getListItems(listTitle,success,error)
    var context = SP.ClientContext.get_current();
    this.web = context.get_web();
    this.list = context.get_web().get_lists().getByTitle(listTitle);
    this.items = list.getItems(SP.CamlQuery.createAllItemsQuery());
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.load(web,'EffectiveBasePermissions');
    context.load(items);
    context.executeQueryAsync(
    function() {
    success(items);
    error
    function success_Items(items){
    var e = items.getEnumerator();
    while (e.moveNext()) {
    this.item = e.get_current();
    console.log(this.item.get_item('FileLeafRef')); //print File or Folder Name
    console.log(this.item.get_item('FileRef')); //print File or Folder Url
    if (this.web.get_effectiveBasePermissions().has(SP.PermissionKind.editListItems)) {
    console.log('Nice, edit list item permissions!');
    else {
    console.log('Boo, no edit list item permissions!');
    function error_Items(sender,args){
    console.log(args.get_message());
    </script>
    <input id="Button1" type="button" value="Check Permissions"/>
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Item Level permission issue

    Hi,
    I have created a custom list for which I have added some users with contribute permissions(The users are not given access at site level). Each user creates  only a single item about himself. He should be restricted from accessing other list items in
    terms of editing/deleting the list items.
    Can you please help me in this regard.
    Regards,
    Chaitanya.

    Hello Chaitanya,
    You need to setup the item level permission from list settings-->advanced settings--> see below screen.
    After this user will be able to edit/view only own items.
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • SharePoint 2013 Rest API - How to get the item count with startsWith

    Hi All,
    I am using the below url to get the item count for specfied startsWith. For example I want to know how many items are there in the list which starts with "A". When i hit the below url in the address bar i am getting HTTP not found.
    siteURL/sites/Apps/SharePointApp3/_vti_bin/listdata.svc/SampleList/items?$filter=startsWith(Title,’A’)
    Navaneeth

    what
    is SharePointApp3.
    here. 
    it is a webpart.
    this will not work on webpart\apps
    Also I am not sure if it will work with specific SampleList 
    Try 
    siteURL/sites/Apps/SharePointApp3/SampleList/_vti_bin/listdata.svc/Keywords?$filter=substringof('r',Title)
    If this helped you resolve your issue, please mark it Answered

  • SharePoint OOB Item level Permission under List Settings

    Users & Roles:
    Authors: User with author role can create a new item but can only edit/delete their own items and not other user items. They should not modify or view the list settings(Permission level - Contribute)
    Editor: User with Editor role can create a new item and can Edit/Delete their own items and also other user items. They should not modify or view the list settings(Permission level - Contribute)
    1. Created a new list.
    2. In advance setting enabled "Item-level
    Permissions" as follows,
    For Read
    Accesss selected "Read all items"
    For Create
    and Edit access selected "Create items and edit items that were created by the user"
    Now, User with Editor access can't able to Edit/delete other user items but can able to Edit/Delete their own items(same as user with Author role).
    Then i have changed the Editor access Permission level to
    Edit. In Edit Permission level  i have enabled Override Check-Out
    and disabled Manage Lists. But still user with Editor access doesn't satisfy the condition.
    kindly help me on this to resolve the above issue.
    For Read
    Accesss select "Read items that were created by the user"
    For Create
    and Edit access select "Create items and edit items that were created by the user"
    For Read
    Accesss select "Read items that were created by the user"
    For Create
    and Edit access select "Create items and edit items that were created by the user"
    For Read
    Accesss select "Read items that were created by the user"
    For Create
    and Edit access select "Create items and edit items that were created by the user"

    Hi Nishok,
    Agree with Paul's opinion, you can create an event receiver to set Item Level Permission. Here is the snippet:
    using System;
    using System.Diagnostics;
    using System.Threading;
    using System.Windows.Forms;
    using System.Security.Permissions;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Utilities;
    using Microsoft.SharePoint.Workflow;
    namespace ItemLevelSecurity.ItemSecurity
    /// <summary>
    /// List Item Events
    /// </summary>
    public class ItemSecurity : SPItemEventReceiver
    /// <summary>
    /// An item was added.
    /// </summary>
    public override void ItemAdded(SPItemEventProperties properties)
    SPSecurity.RunWithElevatedPrivileges(delegate()
    try
    using (SPSite oSPSite = new SPSite(properties.SiteId))
    using (SPWeb oSPWeb = oSPSite.OpenWeb(properties.RelativeWebUrl))
    //get the list item that was created
    SPListItem item = properties.ListItem;
    //get the author user who created the item
    SPFieldUserValue valAuthor = new SPFieldUserValue(properties.Web, item["Created By"].ToString());
    SPUser oAuthor = valAuthor.User;
    //assign permissions to task author
    AssignPermissionsToItem(item,oAuthor,SPRoleType.Reader);
    //update the item
    item.Update();
    base.ItemAdded(properties);
    catch (Exception ex)
    properties.Status = SPEventReceiverStatus.CancelWithError;
    properties.ErrorMessage = ex.Message;
    properties.Cancel = true;
    public static void AssignPermissionsToItem(SPListItem item, SPPrincipal obj, SPRoleType roleType)
    if (!item.HasUniqueRoleAssignments)
    item.BreakRoleInheritance(false, true);
    SPRoleAssignment roleAssignment = new SPRoleAssignment(obj);
    SPRoleDefinition roleDefinition = item.Web.RoleDefinitions.GetByType(roleType);
    roleAssignment.RoleDefinitionBindings.Add(roleDefinition);
    item.RoleAssignments.Add(roleAssignment);
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • What is the minimum functional AD level required by SharePoint 2013

    So we are wanting to set up SharePoint 2013 in our development environment but can't seem to find what the minimum AD level needed for SharePoint 2013 to operate.  I know that the domain controller in our development environment is a bit older, but
    not sure of the OS version and want to know if getting SharePoint 2013 will be as simple as setting up a server based on the minimum software specs listed or if the domain controller will also need an upgrade.  I found a question on this site about AD
    requirements when setting up SharePoint in the DMZ but the answer and the links it provided didn't answer this particular question.  I would have just provided a link to the question that I found, but received the message "Body text cannot contain
    images or links until we are able to verify your account".  No verification e-mail received yet...

    Minimum is Native 2003 (with Domain Controllers running Windows Server 2003 SP2).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • Adobe Photoshop Elements 11 or Photoshop CS6?

    What's the difference between Adobe Photoshop Elements 11 and Photoshop CS6?

  • Problem with evaluating effective permissions/access.

    I'm trying to evaluate some permissions on a large file server. when i come to look at effective permissions i get the following:- "You do not have permission to evaluate effective access rights for the remote resource. Contact the administrator of t

  • Annoying Ipod Synching Problem!!!- Laptop Crash- Now On Another Comp

    I Have a Very Annoying and frustrating Problem with my Ipod Classic (80GB). Recently my laptop Crashed and i got all the music onto my main computer now. The Problem now is getting the music onto my ipod. I Synched it to the computer, Therefore It er

  • How to regenerate Proxy in SRM 7.0

    HI I am working in MM-PI-SUS , srm 7.0. I added a customising field in SUS PO item. I want to regenerated porxy for SUSPO interface : PurchaseOrderRequest_In to make custmising field involed in them but i found the "regenerat" icon or menu is grayed.

  • Unable to access all contacts in address book

    Hello I've been having lots of small problems with my BB Curve and the most recent one being that I can't access some of my contacts in the address book. I recently installed the new Facebook upgrade and think this might have something to do with it