web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Opening a PowerApp ins...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

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!

Christoph

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    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.

  • Community Power Platform Member Profile Picture
    on at

    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.

  • cchannon Profile Picture
    4,702 Moderator on at

    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.

  • Community Power Platform Member Profile Picture
    on at

    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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard