I have a test project documents library in one site collection (projects) and I need to fetch and display these files in another site collection (HR) in SharePoint online , but the users from HR do not have permissions on test project documents and also we do not want to mirror the document library in HR site collection.
I was able to fetch the documents using API call :
var requestUri ="https://xxx.sharepoint.com/sites/<projects site>/_api/web/lists/getByTitle('Test Project Documents')/items?$select=EncodedAbsUrl,*,File/Name&$expand=File";
However regarding the read permissions for the library, I have an issue with it.
The test project documents contains information from different banks and we do not want to give permissions to everyone as they would have access to different bank documents as well.
The requirement was to display information in a web part in different pages for different banks without giving permissions to the project documents.
Please suggest how to proceed further regarding this.
Regards,
Sachin