I'm trying to get the list item permission using restapi in asp.net mvc. i had get the permission using below url



<?xml version="1.0" encoding="UTF-8"?>
-<d:GetUserEffectivePermissions m:type="SP.BasePermissions" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"><d:High m:type="Edm.Int64">2147483647</d:High><d:Low m:type="Edm.Int64">4294967295</d:Low></d:GetUserEffectivePermissions>

Code i tried

    string requestUrl = string.Format("{0}/_api/web/lists/getbytitle('{1}')/items({2})/getusereffectivepermissions('{3}')", siteUrl, listName, id, HttpUtility.UrlEncode(userName));
    string result = RestApi_GetJsonTemp(accesstoken, requestUrl, "application/json; odata=verbose", "application/json; odata=verbose");
    BasePermissions permissionJson = new BasePermissions();
    using (TextReader sr = new StringReader(result))
        JsonReader jsonreader = new JsonReader(sr, null);


how to use this high and low value to know what the permission?

1 Answer 1


The following example demonstrates how to:


function getListPermissions(webUrl,listTitle,accountName) 
    var endpointUrl = webUrl + "/_api/web/lists/getbytitle('" + listTitle + "')/getusereffectivepermissions(@u)?@u='" + encodeURIComponent(accountName) + "'";
    return $.getJSON(endpointUrl);


var accountName = 'i:0#.f|membership|[email protected]'
var listTitle = 'Tasks';
    var permissions = new SP.BasePermissions();
    if (permissions.has(SP.PermissionKind.viewListItems)){
       console.log(String.format('User can access {0} list',listTitle));    

C# version

Since getusereffectivepermissions method returns Microsoft.SharePoint.Client.BasePermissions object that consists of the following properties :

  • High - Specifies the most-significant 32 bits of the BasePermissions uint
  • Low - Specifies the least-significant 32 bits of the BasePermissions uint

the following classes have been introduced:

Having said that, below is provided the C# example that demonstrates how to determine user permissions:

using (var client = new SPHttpClient(webUri, userName, password))
     string endpointUrl = webUri + "/_api/web/lists/getbytitle('" + listTitle + "')/getusereffectivepermissions(@u)?@u='" + Uri.EscapeDataString(accountName) + "'";
     var data = client.GetJson(endpointUrl);
     var permissions = BasePermissions.ParseFromJson(data);
     if (permissions.Has(PermissionKind.ViewListItems)){
                Console.WriteLine("User {0} can access {1} list",accountName,listTitle);    

where SPHttpClient class is a Http client for SharePoint Online , follow Consume SharePoint Online REST service using .NET article for a details.

  • This is in jsom. i need in csom? May 13, 2015 at 11:16
  • This is not neither JSOM nor CSOM, this is REST API using JavaScript. I'm confused with your question, could you clarify your question? May 13, 2015 at 11:21
  • Your saying about SP.BasePermissions that is Client Side. I need in Server Side. May 13, 2015 at 11:23
  • Server Side or Client Side Object Model ? I'm still confused.. Can you explain why your question is tagged with REST but at the same time you are asking about Server Side? May 13, 2015 at 11:26
  • 2
    I would recommend you to get acquainted with Choose the right API set in SharePoint 2013 article to get familiar with APIs and then ask. I guess you need to consume SharePoint REST API in C#, isn't it? May 13, 2015 at 11:32

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.