Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

How to let power apps users download an attachment from SharePoint without permission to the site?

Posted on by

Hi Folks,

 

I have a power apps canvas app which utilizes power automate flows to connect to the data source SPO site. None of the lists are directly connected to app. crud operations are carried out through flows only. Also, none of the end users have access to back end site. Flows uses connection reference of service account that has access to SPO. This allows users to access the data from app. But for attachments in list items we are passing downloadable links to power apps via flow. Since this link is from SPO site itself, users won't be able to access/download it.

 

Is there anyway we can pass the actual attachment file or other workarounds so that users can download these attachments?

 

Thank you. 

  • rbn_nue Profile Picture
    rbn_nue on at
    Re: How to let power apps users download an attachment from SharePoint without permission to the site?

    Hi @natnac123 

     

    Unfortunately, I haven't found a definitive solution yet. Please find some suggestions below which I'm planning to try out:

     

    • When user clicks on button to download attachment, get the file content using service account and store the file in a location where user has access (OneDrive or a Shared SPO library) and then share the link from new location. Will have to write some flow to delete the library contents once in a while.
    • If you're in the initial phase of development, write solution to store all attachments in a separate library with reference to the corresponding item ID instead of storing as attachment in the list. This way you can restrict access to list but give access to library so that they can download attachments. 
    • Create a PCF control to download file from content (fetch content via flow).

    Thanks

  • natnac123 Profile Picture
    natnac123 17 on at
    Re: How to let power apps users download an attachment from SharePoint without permission to the site?

    @rbn_nue  Hi, were you able to to solve your concern? Im trying the same approach and Im stuck with the attachment thing since my Power apps also fully utilize flow to get items from SPO.

  • SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,123 on at
    Re: How to let power apps users download an attachment from SharePoint without permission to the site?

    Since you are using flows all the way through, you could build a flow that is triggered from the Powerapps that sends a downloadable link to the user in an email notification or Teams message

     

    The second option is that the Flow returns the downloadable link which you could use in the Launch function behind a button control.

  • Srini007 Profile Picture
    Srini007 2,817 on at
    Re: How to let power apps users download an attachment from SharePoint without permission to the site?

    Ok @rbn_nue 

     

    Check below post as well

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Prevent-people-from-accessing-SharePoint-list-that-the-PowerApp/td-p/156033/page/2

     

    Thanks

    Srini

  • rbn_nue Profile Picture
    rbn_nue on at
    Re: How to let power apps users download an attachment from SharePoint without permission to the site?

    Hi @Srini007 ,

     

    Thank you for your suggestion. Although, I do not wish to give end users any kind of access to back end SPO list. I've been able accomplish all operations except downloading attachments. 


    Thanks. 

  • Srini007 Profile Picture
    Srini007 2,817 on at
    Re: How to let power apps users download an attachment from SharePoint without permission to the site?

    @rbn_nue 

     

    I believe you can check below link for your reference

    Solved: Powerapps and Sharepoint Online Permissions - Power Platform Community (microsoft.com)

     

    Hope this may help you

     

    Thanks,

    Srini

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard