Hi @ESTELLES DASI, FRANCISCO JAVIER
Per my test, I can retrieve the same result with yours.
This api will return all the users you shared with although some of them are expired. Since you have shared folder with users, the user will exist in SharedWithUsers. You can use GetSharingInformation
to retrieve Expiration. Please refer to following api
_api/web/Lists(<guid>)/GetItemById(<itemid>)/GetSharingInformation?$Expand=permissionsInformation,pickerSettings
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.