Powerful - Embed PowerApps into D365 Dashboards
Ever wanted to embed your PowerApp into a Dynamics 365 Dashboard? No? What’s been stopping you?
During the presentation it was shown that you can actually embed a PowerApp into a D365 Dashboard and what’s more, it functions. I’ll admit, this might not be the most useful of features but this is the sort of thing I love, connecting the wider Office365 apps/services into Dynamics 365 or vice versa.
Anyway, getting back to this, I sat there thinking about how to recreate this functionality. At first I went down the Iframe route but I couldn’t get the PowerApp to load so I decided to think outside the box. What if this isn’t directly loaded from PowerApps itself, what if it’s loaded through an intermediate service? Queue Archimedes moment!
What if I enable Power BI and then embed the PowerApp as a Power BI tile? They both have Power in the name so that should work right? Right.
I loaded up my Power BI workspace which is connected to my Dynamics 365/O365 environment. I go to add a new tile to my workspace and choose Web Content.
Then I give the Tile a title (optional) and paste in some code to load and style an Iframe.
Here’s the code I entered in the Embed code section of the tile
<iframe width="98%" height="98%" src="https://web.powerapps.com/webplayer/iframeapp?source=powerbi&screenColor=rgba(126,4,595,1)&appId=/providers/Microsoft.PowerApps/apps/<App ID>"/>
The App ID above is found in your PowerApp. Go to your PowerApps, Choose Apps.
Choose your app and click on the ellipses, then choose details.
On the details screen you will see the App ID towards to the bottom of the screen.
So in the example abive, the code you would want would be:
<iframe width="98%" height="98%" src="https://web.powerapps.com/webplayer/iframeapp?source=powerbi&screenColor=rgba(126,4,595,1)&appId=/providers/Microsoft.PowerApps/apps/7e64b125-d95d-4237-9701-dbd33a80a2f9"/>
Put that into your Power BI Tile and you should see your PowerApp render in Power BI. Next we need to embed this into a Dashboard. Make sure you have turned on Power BI Components in your System Settings under the Reporting tab, then go and create a new or edit an existing dashboard.
Add a Power BI tile to a dashboard and put in your Workspace, Power BI Dashboard and the Power BI tile you just created.
Save and close the dashboard and voila!
The PowerApp works in the dashboard as well, so you can use it all without leaving your D365 system.
Ciao for now!