0

Let me start by explaining my scenario. I have a list of items (about 40 000) that I added to a SharePoint Online list by means of a Provider-Hosted App. The data comes from an external atom feed that has it's own way of determining which user is allowed to see what. Now, before I go and try and decipher the ACL's built into the XML, I thought of digging though the SharePoint side first.

So, being fairly new, I'm having a little trouble realizing a solution or even a starting point. The list itself cannot be seen by anyone, so that's already set correctly, but the problem is when people search for things. They see results that they are not allowed to see.

So really the question is. Can I assign different permissions for different items in the same list? Or can I configure that in the results page? And can I then add this code to my Provider-Hosted App

It might just be the way I'm asking the question, but I cannot seem to really find useful info on the topic.

EDIT: I want to be able to do all this in the app in C# code using the CSOM. I would prefer not using the UI

2
  • It is not recommended to have unique permissions for that many list items in a single list, performance takes a nose dive. Can you use audience targeting in this scenario? Oct 8, 2014 at 17:51
  • Well, the permissions don't have to be on the list itself, I suppose. If it's possible to show relevant results that the user is allowed to see after he has already searched for it, then that would be fine too.
    – Scubacode
    Oct 9, 2014 at 7:38

1 Answer 1

1

You can go to that List Settings--> Advanced Settings --> Set "Allow items from this list to appear in search results?" to No.Now these items will not appear in search results.

Another option is to break inheritance and set Item level permission in that List. See this blog to know how to set item level permission using designer workflows. This will take care of setting the item level permission for any new item being added

Also ,You can write a console application for setting the item level permission for the existing 40k items. See this post for setting item level permission using CSOM.

5
  • Ok but then that will hide the entire list right? I want certain items to show and others not. So, unless I can set it to no and then override that in my code per item, I'm afraid that that doesn't answer the question
    – Scubacode
    Oct 8, 2014 at 15:27
  • Yes it will prevent all the items of that list from being shown in SharePoint search results.
    – Unnie
    Oct 8, 2014 at 15:29
  • sorry, but then that doesn't help me at all
    – Scubacode
    Oct 8, 2014 at 15:31
  • Then you might have to keep item level permissions, so that each item will have unique permission
    – Unnie
    Oct 8, 2014 at 15:34
  • well that was my question, if permissions can be set per item programmatically(and also not one-by-one as there are over 40k items)
    – Scubacode
    Oct 8, 2014 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.