When we have to programmatically apply fine grain permissions to the List items, we have to ensure the ACL (Access Control List) limit is under control as defined in Software Boundaries. Typically, in Server side object model (SSOM), Microsoft provides a method called AddToCurrentScopeOnly. The best practice document also suggest to use this method. To quote what is mentioned in the above article:
This method is already requested to be included in client side APIs in SharePoint User Voice. So we only have to wait till Microsoft adds this method to the APIs. Phew!
End Note: Please visit the SharePoint User Voice link and vote for this feature.
Use the AddToCurrentScopeOnly method to assign Limited Access membership in a SharePoint group. The key element in this principle is to redesign the architecture so that scope membership does not cause Access Control List (ACL) recalculation at the parent document library and web.In fact, I have used this method in SSOM and it works fine. So when I had to apply fine grain permission to the List items using REST API, I was looking for an endpoint for AddToCurrentScopeOnly. But I could not find any reference in MSDN. It turned out that this method is not available in client side APIs including Client Side Object Model (CSOM), JavaScript Object Model (JSOM) and REST. I just could not believe how Microsoft can miss adding something which is a best practice!
This method is already requested to be included in client side APIs in SharePoint User Voice. So we only have to wait till Microsoft adds this method to the APIs. Phew!
End Note: Please visit the SharePoint User Voice link and vote for this feature.
Comments
Post a Comment