
Hi @Gal Yaniv
You will need to loop all the files and check if the user have permission to the item by the following endpoint
/_api/web/lists(listid)/items(itemid)/getUserEffectivePermissions(userName)
This will make huge amount of api calls. As a workaround, I will recommend you to use powershell to get the user permission report. You can refer to the following article to get the csv report
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.