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.

Microsoft 365 and Office | SharePoint | For business | Windows
{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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.