Answered by:
set item level permissions in list using CSOM

Question
-
I have a process that is uploading data into a list. Once the data is uploaded, I then need to set permissions for certain rows in the list where a column meets certain criteria. I'm unable to use a receiver or workflow or powershell for this
Example:
if (columnb == "IT")
{
then only IT folks should see this
}
Is this possible to do using CSOM/C#
- Edited by SharePointGuy123 Friday, June 17, 2016 5:20 PM
Friday, June 17, 2016 5:14 PM
Answers
-
Hi,
With CSOM and C#, we can access value of columns of list items as below:
About setting item level permissions:
http://www.morgantechspace.com/2016/04/set-list-item-level-permission-using-csom-c-sharp.html
In your scenario, what you need to do is, in the code logic, get the value of a specific column of an item, then alter the permission setting of it accordingly.
The two links above would be helpful to you.
Best regards,
PatrickTechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- Proposed as answer by Patrick_Liang Friday, June 24, 2016 10:03 AM
- Marked as answer by Patrick_Liang Monday, June 27, 2016 9:49 AM
Monday, June 20, 2016 7:30 AM
All replies
-
Hi,
Also you can use permissions.asmx web service to for item level permission.
using JSON check this .
KRISHANA KUMAR
SharePoint Architect
Please click "Mark As Answer" if this post solves your problem or "Vote As Helpful" if it was useful
- Edited by KRISHANA KUMAR Friday, June 17, 2016 5:30 PM
Friday, June 17, 2016 5:30 PM -
I need item level bases on a column value, those links won't helpFriday, June 17, 2016 5:48 PM
-
Hi,
Item level Permission for Column not possible using both Client object model and Server Object model, you have to use Jquery and JS to check manually and hide the DOM after loading on your Form.
http://sympmarc.com/2012/11/29/easily-hide-columns-on-a-sharepoint-form-with-jquery/
Out of the box, SharePoint supports access control to the item (or document) level. Access policies can be scoped at the folder, list (library) and site levels. Related security policies are configured at the site collection level (Site Collection Administrators membership and permission levels) and at the Web application level (User Access Policy)
Check this if it helps you.
http://www.boostsolutions.com/columnpermission.html
KRISHANA KUMAR
SharePoint Architect
Please click "Mark As Answer" if this post solves your problem or "Vote As Helpful" if it was useful
- Edited by KRISHANA KUMAR Friday, June 17, 2016 8:04 PM
Friday, June 17, 2016 8:03 PM -
Hi,
With CSOM and C#, we can access value of columns of list items as below:
About setting item level permissions:
http://www.morgantechspace.com/2016/04/set-list-item-level-permission-using-csom-c-sharp.html
In your scenario, what you need to do is, in the code logic, get the value of a specific column of an item, then alter the permission setting of it accordingly.
The two links above would be helpful to you.
Best regards,
PatrickTechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.- Proposed as answer by Patrick_Liang Friday, June 24, 2016 10:03 AM
- Marked as answer by Patrick_Liang Monday, June 27, 2016 9:49 AM
Monday, June 20, 2016 7:30 AM