Hi Folks,
I have a canvas app connected to SharePoint via power automate. A service account is used for all connections in Power automate flows thereby removing the need for end users to have any access to backend SPO. The only challenge is when users need to download attachments/files from list/libraries. If we give the SPO URL it will return access denied for users. The flow can certainly get the file content and send it back to canvas app. Is there anyway to let the users download the file using this content from canvas app? I'm not interested in again storing this file content in other data source and give them the link.
Any suggestions?
Thank you!
Hi @rbn_nue ,
Passing files between Power Apps and Power Automate is not possible. The workaround from Power Apps to Power Automate is to pass the file name and file contents as text and then use those to create a file in Power Automate. Unfortunately there's no function to create files in Power Apps, which is why this doesn't work the other way around.
If you want users to be able to download files directly from the Power App, you'll have to share them with the user.
Having said that, you might consider creating two flows to share / unshare a file and then in Power Apps sandwich a Download function between them. In pseudo code:
FlowToShareFile.Run(File.ID);
Download(File.URI);
FlowToUnshareFile.Run(File.ID);
Hi @BCBuizer ,
Thanks for the suggestion. We already do that for reports that take time to generate. But these attachments/file which are already available on click are expected to be downloaded on the spot.
Thanks.