I'm currently embedding a Power Apps Canvas App into a SharePoint Online page using the Power Apps web part. The app displays a variable number of events (e.g., birthdays, meetings), and I’ve implemented logic in Power Apps to dynamically adjust the screen height based on the content:
Screen.Height = Max(
App.MinScreenHeight,
If(
CountRows(AllUpcomingEvents) = 0 && CountRows(AllTodayEvents) = 0,
127,
If(
CountRows(AllUpcomingEvents) = 0,
CountRows(Today.AllItems) * Today.TemplateHeight + 49,
CountRows(Today.AllItems) * Today.TemplateHeight + 49 +
Sum(
["Birthday", "Anniversary", "Out of Office", "Flex", "Staff Meeting"],
If(
CountRows(Filter(AllUpcomingEvents, Category = ThisRecord)) > 0,
60 + 168,
0
)
)
)
)
)
This works perfectly inside Power Apps Studio — the height adjusts as expected when events are added or removed.
But here’s the issue:
Once the app is embedded into SharePoint, the height becomes fixed and does not shrink or grow with the content. Even when there are no events to show, the web part keeps a large empty space. It seems SharePoint doesn't respect the dynamic height and instead applies a static iframe height.
My goal:
I want the app to shrink or grow dynamically based on the number of items, so it doesn’t leave large empty space on the SharePoint page.
Has anyone successfully implemented a fully responsive height experience for embedded Power Apps?
Would love to hear any workarounds, examples, or even limitations you've found! Open to ideas, including code-based solutions if needed.
Thanks in advance!