Embed OneDrive for Business Document in PowerApp Portal in Five Steps |PowerApp Quick Tip

Recently I came across a scenario where I need to display document on PowerApp portal.

Since most of the website allow users to download publicly available document from there website, in PowerApp portal there isn’t any straight solution.

But we can achieve it by a simple trick , all it needs is five minutes and five steps, assuming you already have a portal configured and a page where you want your document to be embedded.

Step 1:

Create a shareable link of a document by clicking on Copy Link as shown in image below.

Crate shareable link , by clicking on Copy Link button on toolbar
Crate shareable link , by clicking on Copy Link button on toolbar

Step 2

Set your permission level , I removed edit option so that people can only download the file, not edit it online.

Control Document permision
Update Link setting , allow editing , password and download rights

 

Step 3

Insert an IFrame in your portal page

Select IFrame from powerapp components list
Select IFrame from PowerApp components list

and now here is the important part.

Step 4

In the end of your document shareable link add this little text

&action=embedview

for example if your url is like this.

https://crm669197-my.sharepoint.com/:x:/g/personal/admin_crm669197_onmicrosoft_com/EcOPjSe4smRArejKciFxE5YBLQU1Fn81iHRKa-WMCACnSw?e=BvgV8V

Your updated URL will look like this.

https://crm669197-my.sharepoint.com/:x:/g/personal/admin_crm669197_onmicrosoft_com/EcOPjSe4smRArejKciFxE5YBLQU1Fn81iHRKa-WMCACnSw?e=BvgV8V&action=embedview 

Step 5

Paste your updated URL into Link property of the IFrame.

Update Link URL , in IFrame property.
Update Link URL , in IFrame property.

Its done, so now whenever a visitor visits portal, they can view your excel , download it or edit it, based on the permission you’ve set while creating shareable link (in Step 1).

Read Only Excel Preview for user
Read Only Excel Preview for user

It doesn’t require any sign in because we are controlling document access using link permission (in Step 2).

To download and view excel visitor can click on the button available in  bottom right corner.

View Full Size Workbook in embeded excel

Excel Preview

I am still looking for a solution to embed a folder , if you have done it Let me know in comment section below , or if you have any thoughts about this post do let me.

🙂

Thank you.

Advertisement

2 Replies to “Embed OneDrive for Business Document in PowerApp Portal in Five Steps |PowerApp Quick Tip”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: