SpRestLib

SpRestLib

  • Download
  • Get Started
  • API Documentation
  • SharePoint Guides
  • GitHub

›Recent Posts

Recent Posts

  • Uploading a file to a SharePoint library using JavaScript
  • Downloading a file from SharePoint library using JavaScript and REST API
  • Converting SharePoint 2010 API column names to SharePoint 2013 API column names
  • SharePoint List Unique Permissions REST Query
  • Adding a User to SharePoint Group Using REST with SpRestLib
  • Creating SharePoint jQuery People-Picker with SpRestLib
  • Creating SharePoint List Columns Using REST
  • Uploading a file to a SharePoint library using REST

SharePoint List Unique Permissions REST Query

October 28, 2018

Brent Ely

How to determine if a SharePoint List/Library has unique, non-inherited permissions (role assignments).


Example

sprLib.list('Site Assets').info()
.then(objInfo => console.log(objInfo))
.catch(strErr => console.error(strErr));

Results

.-----------------------------------------------------------------------.
|         Prop Name          |                Prop Value                |
|----------------------------|------------------------------------------|
| AllowContentTypes          | true                                     |
| BaseTemplate               | 101                                      |
| BaseType                   | 1                                        |
| Created                    | "2016-07-29T02:48:24Z"                   |
| Description                | "Use this library to store files ..."    |
| DraftVersionVisibility     | 0                                        |
| EnableAttachments          | false                                    |
| EnableFolderCreation       | true                                     |
| EnableVersioning           | true                                     |
| ForceCheckout              | false                                    |
| HasUniqueRoleAssignments   | false                                    |
| Hidden                     | false                                    |
| Id                         | "ada18ff5-ab9f-4e05-89ff-7656f4d7325e"   |
| ItemCount                  | 142                                      |
| LastItemDeletedDate        | "2018-08-29T02:43:19Z"                   |
| LastItemModifiedDate       | "2018-10-27T22:14:31Z"                   |
| LastItemUserModifiedDate   | "2018-10-17T02:00:58Z"                   |
| ListItemEntityTypeFullName | "SP.Data.SiteAssetsItem"                 |
| Title                      | "Site Assets"                            |
'-----------------------------------------------------------------------'

Usage

The info() SpRestLib method returns several useful List properties, one of which is HasUniqueRoleAssignments. This boolean value will tell you if a Lis/tLibrary has unique permissions.

Tweet
Recent Posts
  • Example
  • Results
  • Usage
SpRestLib
Docs
Getting Started with SpRestLibSharePoint API ReferenceSharePoint Development GuidesAbout JavaScript Promises
Community
FacebookTwitterPinterestYouTube Channel
More
GitHub IssuesGitHub ProjectSpRestLib on Stack OverflowSite Icons
Copyright © 2019 Brent Ely