Showing results for 
Search instead for 
Did you mean: 
New Member

Opening a PowerApp inside an Office Add-In / Loading remote Javascript libraries into PowerApps

Hello there!

I am trying to open up a Canvas app inside an Office Add-In. It opens up fine and works too, but only after clicking through 2 warning messages. From my experience with Add-Ins, this is caused because the Add-In Office Api is not loaded into the website code. Is there a way to reference and initialize the Office JavaScript library inside a Canvas App?


I tried using a PCF control, as I read there is no other way of getting JavaScript code into a Canvas App without them. It didn't seem very promising and I had no luck with it so far, but I wanted to use a Custom Code Component that just loads the library to see if it works..


Looking forward to your answers!

Thanks and cheers!


Super User
Super User

I could be wrong here, but I don't think this is going to work for you. The Canvas App does not let you add custom JS--you are correct--and although you can do it in a PCF, that PCF is effectively iframed in to the canvas app; it doesn't have the same scope as the parent window so while maaaayyyyybe the Office Add-In API will be able to find the office app hosting it all, I would be pretty surprised to see it. You'll probably just have to build your own SPA to accomplish it, rather than using Canvas Apps.

Thanks for the response! I am thinking that too and SPA was the initial plan anyways, but as it is in order for my studies too, I'd like to asses wether PowerApps can be used here or not. As their default dataverse connection works pretty well, it would have been very comfortable.

One thing you might try, depending on the specifics of your use case, is creating a SPA that is basically just an iFrame shell. It pops an IFrame and passes it your canvas app URL with some QSParams appended to the URL. Then in your canvas app you have a PCF that looks at the URL and reads the QSParams. 

IF you only need data to pass into your app and not be particularly interactive, this would probably work.

New Member

This would work one way but I think it wouldn't be very practical in the long run.

The main idea was to use a PowerApp in order to minimize deployment effort for new or adapted versions of the Add-In.

Having even a single page with just an IFrame requires me to deploy webresources, configure the URLs for each instance that will be deployed, and might even pose authentication issues. It might not be advantageous enough over just using an SPA on its own.


I will research this a bit further, but if it is not possible, at least that would be a learning for my studies.

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,468)