I have created a flow for some users to select an item on a Sharepoint list of people and get a list of assets assigned to those people on a different sharepoint site. The whole point of the script is that I don't have to give them access to the other sharepoint site but can still return information to them.
However the Get Items function is failing with the below error:
{"odata.error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Attempted to perform an unauthorized operation."}}}
According to the script run it using my powerautomate account to run the Get Item function (that account does have access to the other sharepoint site) and not the account of the user who called the flow in SharePoint (who doesn't have access).
If I give the user access to the sharepoint site the error doesn't occur but I don't want to give them access. The whole point is that I can control what information they can access with Power Automate. Any help or feedback would be greatly appreciated.