0

I need to get all users/groups that have permissions on an item x, is there any way to get this information via C#?

1 Answer 1

0

Of course you can. You can use CSOM. Connect to web using credentials, get list that you want. Get all items or specific field using caml query

query.ViewXml = "<View/>";
items=SourceList.GetItems(query);
clientContext1.Load(items);
clientContext1.ExecuteQuery();

Each item like SecurableObject has it's permissions list.

  • item.RoleAssignments; - it is permissions list
  • each permission has:
  • permission.RoleDefinitionBindings
  • permission.Member
1
  • Could use fleshing out a bit...
    – user43832
    Commented Jul 24, 2018 at 14:28

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.