Item Level Permissions not working for list items in a custom list using SharePoint REST API

Vivek Gupta 126 Reputation points
2020-09-21T05:00:19.957+00:00

Hi,

I have applied item level permissions for list items in a custom list in SharePoint Online.

In custom SPFx Web Part, I am using SharePoint REST API that should return only those records from the custom list for which the user has permission. However, user is able to view all the records from the custom list. Other users are also able to view all the records from the custom list.

Sample SharePoint REST API used:

https://xyz.sharepoint.com/sites/testsite/subsite1/_api/web/lists/getbytitle('list1')/Items?$select=ID,Title,Location,Category,EventDate,EndDate,EventArticleMapping&$top=4&$filter=(EventDate ge datetime'2020-09-18T00:00:00Z') and (EventArticleMapping ne '')&$orderby=EventDate asc

Please let me know what is the solution for this issue.

Thanks.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,025 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-09-22T02:26:37.633+00:00

    You could check user permission in permission for item page. In this way, you can accurately know all the permissions that the user has on this item.
    User with permission:
    26322-image.png
    User without permission:
    26323-image.png

    0 comments No comments