I want to get all the document libraries in which current user has full control using rest api.

it seems that we can check using effectiveBasePermissions.

I have used below script :

 function GetModifiedDoclib() {
  var executor;
  var appwebUrl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
  executor = new SP.RequestExecutor(appwebUrl);
    url: appwebUrl + "/_api/SP.AppContextSite(@target)/web/lists?@target='" + hostwebUrl + "'&$select=Title,effectiveBasePermissions&$filter=BaseTemplate eq 101&$orderby=LastItemModifiedDate desc",
    method: "GET",
    headers: { "Accept": "application/json; odata=verbose", "X-RequestDigest": $("#__REQUESTDIGEST").val() },
    success: function (data) {
        var jsonObject = JSON.parse(data.body);
        var results = jsonObject.d.results;
    error: errorListHandlerXD

i have make one document library(TestDoc) and havent access of current user.another one document library(Documents) has full control.

my API Output look like :

  [{ EffectiveBasePermissions":{"__metadata":{"type":"SP.BasePermissions"},


My doubt : what are value of High and low indicated in output and how can i know user have full control to document library?

Can you please guide me?

1 Answer 1


Here is link of Permission mark with value :



I am not found any solution using REST API but i have accomplish my requirement using Client object model.

function GetModifieldDocLib_Privilege() {

 hostwebUrl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
 appwebUrl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));

 context = new SP.ClientContext(appwebUrl);
 factory = new SP.ProxyWebRequestExecutorFactory(appwebUrl);
 appContextSite = new SP.AppContextSite(context, hostwebUrl);
 var oWebsite = appContextSite.get_web();
 var collList = oWebsite.get_lists();
 this.listInfoArray = context.loadQuery(collList, 'Include(Id,Title,EffectiveBasePermissions,BaseTemplate)');

 //Execute the query with all the previous 
 //  options and parameters
     Function.createDelegate(this, GetAllDocLibWithPrivilege),
     Function.createDelegate(this, errorHandler)

function GetAllDocLibWithPrivilege() {

for (var i = 0; i < this.listInfoArray.length; i++) {
    var oList = this.listInfoArray[i];

    if (oList.get_baseTemplate() == 101) {
        var perms = oList.get_effectiveBasePermissions();
        if (perms.has(SP.PermissionKind.editListItems)) {
            // get documentlibraries object whose Current-user has Edit Permission. 


Hope its helps!!

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.