Questions tagged [role-assignment]

The role assignment is the relationship among the role definition, the users and groups, and the scope (for example, one user may be a reader on list one, while another user is a reader on list two).

Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

SPListItem.RoleAssignments - not an empty SPRoleAssignmentCollection, but actually null?

I ran into this situation a little over a year ago and asked about it on the SP Discord channel. Here's what I asked: Hey, anyone ever run into a situation where the SPRoleAssignmentCollection for ...
Dylan Cristy's user avatar
  • 12.6k
1 vote
0 answers
33 views

RoleDefinitionBindings (401) after creating ShareLink

I am a Site admin an the SC (so I have FullControl / EnumeratePermissions). For my application I use this API call on every Item with UniquePermissions: ${siteUrl}/_api/web/lists/getByTitle('${List}')/...
Kaius's user avatar
  • 11
0 votes
1 answer
149 views

How to determine if a RoleDefinition grants read access or not?

I have the role definitions like this: https://YOUR_TENANT.sharepoint.com/sites/YOUR_SITE/_api/web/roledefinitions So this will return something like: {_ObjectType_=SP.RoleDefinition, _ObjectIdentity_=...
Nicholas DiPiazza's user avatar
0 votes
1 answer
462 views

For Sharepoint 2013, $expand and $select params does not work together

For sharepoint, we are trying to get files within a given list id along with its roleAssignments information. For this, we are using REST API /Lists(guid'list_ID')/items?$expand=File&$select=*,...
Nidhi Teli's user avatar
0 votes
1 answer
368 views

What scope/permissions do I need to get RoleAssignments via the rest api?

I am using rest API role assignment for SharePoint Online with Oauth2.0 to fetch advanced permissions. But, I cannot give Full Control Scope to my Application. Is there any other way where I can get ...
Sayali A. Rathi's user avatar
0 votes
1 answer
67 views

Assign read and admin roles to the users on a list item in SPOnline using JSOM

I am now inheriting the permissions as I only have two groups which is group1 which has full control already and the other group is domain group which is everybody in the org so I removed that group ...
kart's user avatar
  • 353
2 votes
2 answers
1k views

Break role inheritance via Graph API

I've been trying to switch between SharePoint REST API and Graph API and I can't find an equivalent of breakroleinheritance() _api/web/GetFileByServerRelativeUrl('/sites/sitename/Shared%20Documents/...
naugtur's user avatar
  • 121
0 votes
0 answers
87 views

Access Denied to list after granting permissions to a group on a list

After granting View/Add/Edit/Open/Delete ListItems to group on a list, the users of the group still get Access Denied when trying to access the list. Here's the code I used to grant permissions: ...
Bellatrix's user avatar
2 votes
0 answers
151 views

Error after assigning permissions to a group using CSOM

After assigning permissions to a group on a Sharepoint list, the users of the group trying to access said list get the Microsoft.SharePoint.Client.ServerException: "The list « listTitleExample» does ...
Bellatrix's user avatar
1 vote
1 answer
101 views

Site collection administrator created through CSOM cannot view site

I am having a strange situation where I am not able to view a site collection as a site collection administrator. The catch is that I created the site collection admin through CSOM. Steps to ...
Nicholas DiPiazza's user avatar
0 votes
1 answer
3k views

CSOM + SharePoint Online - unable to get list item role assignments

I have made a very simple CSOM program where I have fetched a List Item and I have verified that it has listItem.HasUniqueRoleAssignments = true So with that being the case, I want to get the List ...
Nicholas DiPiazza's user avatar
0 votes
1 answer
454 views

getting all AD groups and users of a site collection

Hello everybody I am quite new to the Sharepoint, I am trying to get all the AD groups who have permissions on a sitecollection. I am able to get all the SPgroups and users using the code below in my ...
Meerza Khizar Bayeg's user avatar
2 votes
1 answer
270 views

How to convert user field values into objects for adding permissions in powershell?

I have a list with a multi select (user and group) field. I want to grab the values from there and then pass them to the add permissions method. I grab the values but they come out like this 12;#...
omega's user avatar
  • 2,160
1 vote
0 answers
406 views

Addroleassignment uses a subsite specific principal guid using Rest

I am trying to add role assignments to SharePoint Online to a folder on a personal sub site. I looked up all the users against the parent site and I have a guid of 282. When I try and assign a new ...
GavinF's user avatar
  • 111
0 votes
1 answer
799 views

JSOM Break SharePoint List Item Permission

I wrote the following code to break list item permission. Code works fine other than a small issue. var user; function breakItemPermission(itemID) { //Get the current context var context = ...
Sivakumar Piratheeban's user avatar
3 votes
1 answer
177 views

REST API equivalent of SPRoleAssignmentCollection.AddToCurrentScopeOnly

To add a custom permission to a List or an item, we can use SPRoleAssignmentCollection and we can also use AddToCurrentScopeOnly to avoid adding users with Limited Access permission to the parent. In ...
Suresh C's user avatar
0 votes
1 answer
1k views

Copy role assignments from one folder to another using CSOM C#

I want to copy role assignments from one folder and set it to other folder I am basically creating a subfolder and I want that folder to have same permission as its sibling I tried Folder ...
Vignesh Subramanian's user avatar
0 votes
1 answer
10k views

breakRoleInheritance and addRoleAssignment not working using rest api query

I have a site accessible by everyone in our organization, inside this site, one library. In this everybody can create folder to upload the files, this is happening through provider hosted app using ...
Nagnath's user avatar
2 votes
3 answers
3k views

SharePoint 2013 REST API Filter hidden Fields

I have a little Problem. I'm trying to do the following. There is a Field on SharePoint List items called HasUniqueRoleAssignments that is hidden on a standard REST call. If I put it in the select ...
relief.melone's user avatar
0 votes
1 answer
29 views

Unable to Remove a Users Permissions from a doc.lib item in a event receiver

As per my requirement i need to remove a particular user from his permissions from document library item .There is a field called Assigned_To in my docu.lib and I DONT want HIM to access the docu....
samolpp2's user avatar
  • 3,530
2 votes
1 answer
4k views

Remove Role Assignment by Role Definition name

I'm adding permissions for a user for a specific SPListItem: SPRoleAssignment roleAssignment = new SPRoleAssignment(user); roleAssignment.RoleDefinitionBindings.Add(web.RoleDefinitions["ASpecificRole"...
Mariusz Ignatowicz's user avatar
3 votes
2 answers
148 views

Remove All RoleAssignemnts Except Current Loggedin User

I have written code for removing all roleassignments for a splistitem using the itemadded() and itemupdated() eventhandler . But my requirement is how can I prevent the removal of currentloggedin user ...
samolpp2's user avatar
  • 3,530