In my case I used the Activities named Sharepoint Application Scope and Get List Items.
Sharepoint Application Scope: I set it up with the credentials that have access to the SharePoint list and added the site URL.
Example URL: https://COMPANY_NAME.sharepoint.com/TEAM_NAME/SITE_NAME
This error appears when using Windows Framework, this package is only in Legacy Framework, because UiPath Team is migrating all packages, so there are still pending packages.
Also, I recommend you create the project in the old framework to avoid problems or use other steps: